# Tanod Docs – PDF Set Outline (Bookmarks)

> Tanod Docs – PDF Set Outline (Bookmarks) is a paid API for AI agents from docs.tanod.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-13).

Replaces or removes the bookmark/outline tree of a PDF with a user-defined hierarchical set of named chapter links.

## Facts

- Endpoint: POST https://docs.tanod.dev/v1/pdf/set-outline?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/tanod-docs-pdf-set-outline-bookmarks-44c84659
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_n-Xlhbuoyqkey2dCpp23_

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability tanod-docs-pdf-set-outline-bookmarks-44c84659 -d '<json body>'
```

Example prompt: Take this PDF (https://example.com/report.pdf) and set its bookmarks so it has three top-level chapters — 'Introduction' on page 1, 'Analysis' on page 4, and 'Conclusion' on page 9 — and return the result as a download link.

## When to prefer this

Choose this endpoint when you need to programmatically set, replace, or clear the navigational bookmark/outline structure of an existing PDF without altering its content. It is ideal for publishing workflows where chapter navigation must be added to generated PDFs, for sanitizing PDFs by stripping old bookmarks, or for injecting a structured table of contents into reports and manuals. It also automatically strips dangerous active content (XFA, JavaScript), making it useful as a light security step.

## Known failure modes

- PDF URL exceeds 20 MB or is inaccessible/private — request refused
- Base64 payload exceeds 10 MB decoded — request rejected
- Outline tree exceeds 1,000 total bookmarks or 8 nesting levels — validation error
- Page numbers in the outline reference pages beyond the PDF's actual page count — error
- Invalid or corrupt PDF input — processing failure
- URL points to an internal or IP-literal host — refused for security

## How this service works

Documents: DOCX template fill, Office to PDF, any file to Markdown, PDF to Word, OCR, PDF pipeline.

## Output

Returns the modified PDF with the new bookmark/outline structure applied, either as an inline base64-encoded file or as a temporary 24-hour download URL. The response includes the output file size, page count, outline depth, total bookmark count, and a report of any active content (XFA forms, JavaScript) removed during processing.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "url": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 2048,
     "minLength": 1
    },
    {
     "type": "null"
    }
   ],
   "default": null,
   "description": "Public http(s) URL of the PDF (at most 20 MB; private, internal and IP-literal hosts are refused); or use pdf_base64."
  },
  "output": {
   "enum": [
    "base64",
    "url"
   ],
   "type": "string",
   "default": "base64",
   "description": "base64 (default): the file comes back inline as base64. url: the file is stored for 24 hours and the reply carries a download link (url, expires_at, bytes, content_type, sha256) instead of the base64, which keeps the file out of your context window."
  },
  "outline": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "title",
     "page"
    ],
    "properties": {
     "open": {
      "anyOf": [
       {
        "type": "boolean"
       },
       {
        "type": "null"
       }
      ],
      "default": null,
      "description": "Whether a bookmark with children starts expanded (default false)."
     },
     "page": {
      "type": "integer",
      "maximum": 2000,
      "minimum": 1,
      "description": "The 1-based page the bookmark opens."
     },
     "title": {
      "type": "string",
      "maxLength": 300,
      "minLength": 1,
      "description": "The bookmark's text (1-300 printable characters)."
     },
     "children": {
      "anyOf": [
       {
        "type": "array",
        "items": {
         "type": "object",
         "additionalProperties": true
        }
       },
       {
        "type": "null"
       }
      ],
      "default": null,
      "description": "Child bookmarks: objects with these same fields (title, page, open, children)."
     }
    },
    "additionalProperties": false
   },
   "maxItems": 1000,
   "description": "The new bookmarks as a tree of {title, page, open?, children?}: at most 1,000 in all and 8 levels deep; an empty list removes every bookmark. They replace the ones the PDF has."
  },
  "pdf_base64": {
   "anyOf": [
    {
     "type": "string",
     "maxLength": 13398872,
     "minLength": 1
    },
    {
     "type": "null"
    }
   ],
   "default": null,
   "description": "The PDF as base64 (at most 10 MB decoded per request); or use url."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "file": {
   "name": "bookmarked.pdf",
   "bytes": 90412,
   "pages": 6,
   "data_base64": "JVBERi0xLjcKJb/3... (trimmed: 120,552 base64 characters in the reply)",
   "content_type": "application/pdf"
  },
  "replaced": false,
  "operation": "set-outline",
  "input_bytes": 140815,
  "input_pages": 6,
  "output_bytes": 90412,
  "outline_depth": 2,
  "outline_items": 4,
  "untrusted_content": true,
  "active_content_removed": {
   "xfa": 1,
   "javascript": 1
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tanod-docs-pdf-set-outline-bookmarks-44c84659/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from docs.tanod.dev](https://www.zero.xyz/host/docs.tanod.dev/llms.txt)
