# Tanod Docs PDF Pipeline

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

Runs a multi-step PDF processing pipeline (rotate, crop, resize, extract pages, set outlines, flatten, repair, inspect, etc.) on a PDF supplied by URL or base64.

## Facts

- Endpoint: POST https://docs.tanod.dev/v1/pdf/pipeline?utm_source=zero.xyz
- Price: $0.01/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-pipeline-0ef1cf4e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_roGhP4Nyakfh2ghyUpsHq

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-pipeline-0ef1cf4e -d '<json body>'
```

Example prompt: Take this PDF (https://example.com/report.pdf), extract pages 1–3, resize them to A4, and then add a bookmark outline — return the final file as a base64-encoded PDF.

## When to prefer this

Choose this endpoint when you need to chain multiple PDF operations (up to 10) in a single API call rather than making separate requests for each transformation. It is ideal for workflows like extract-then-resize-then-bookmark or repair-then-flatten. Prefer this over single-operation PDF endpoints when the task has two or more sequential steps, or when you want a unified step-by-step audit report of all operations applied.

## Known failure modes

- PDF URL is private, internal, or IP-literal — request refused
- PDF exceeds 20 MB (URL) or 10 MB decoded (base64) — rejected
- More than 10 steps specified — validation error
- inspect or outline step is not the last step — rejected
- Pipeline times out after 70 seconds — timeout error
- Malformed or unreadable PDF — repair op required or error returned
- Invalid op name in steps array — validation error
- Both url and pdf_base64 omitted or both provided — ambiguous input error

## How this service works

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

## Output

Returns a JSON object containing the processed PDF (inline as base64 or as a 24-hour download URL with metadata), plus a per-step report including op name, step number, output bytes, page count, and any active content removed. Also includes totals for input pages, input bytes, output bytes, and number of steps run.

## 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."
  },
  "steps": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "op"
    ],
    "properties": {
     "op": {
      "enum": [
       "rotate",
       "remove-pages",
       "extract-pages",
       "reorder",
       "crop",
       "resize",
       "set-outline",
       "flatten",
       "repair",
       "inspect",
       "outline"
      ],
      "type": "string",
      "description": "rotate, remove-pages, extract-pages, reorder, crop, resize, set-outline, flatten or repair (each takes the PDF the step before made and makes the next one); inspect or outline (a JSON report: last step only)."
     },
     "params": {
      "type": "object",
      "description": "That operation's own parameters, exactly as its single route takes them (e.g. {\"angle\": 90, \"pages\": \"1-2\"} for rotate), without url or pdf_base64.",
      "additionalProperties": true
     }
    },
    "additionalProperties": false
   },
   "maxItems": 10,
   "minItems": 1,
   "description": "The operations to run in order, 1 to 10 of {op, params}: the output of each is the input of the next. inspect and outline return a report and can only be last. The whole call has one 70 s time budget."
  },
  "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."
  },
  "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": 53412,
   "pages": 3,
   "data_base64": "JVBERi0xLjcKJb/3... (trimmed: 71,216 base64 characters in the reply)",
   "content_type": "application/pdf"
  },
  "steps": [
   {
    "op": "extract-pages",
    "step": 1,
    "pages": 3,
    "output_bytes": 52010,
    "active_content_removed": {}
   },
   {
    "op": "resize",
    "mode": "fit",
    "size": "a4",
    "step": 2,
    "pages": 3,
    "output_bytes": 52960,
    "resized_pages": 3,
    "sizes_truncated": false,
    "active_content_removed": {}
   },
   {
    "op": "set-outline",
    "step": 3,
    "pages": 3,
    "replaced": false,
    "output_bytes": 53412,
    "outline_depth": 1,
    "outline_items": 1,
    "active_content_removed": {}
   }
  ],
  "operation": "pipeline",
  "steps_run": 3,
  "input_bytes": 140815,
  "input_pages": 6,
  "output_bytes": 53412,
  "untrusted_content": true,
  "active_content_removed": {}
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/tanod-docs-pdf-pipeline-0ef1cf4e/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)
