# Tanod Docs PDF Reorder

> Tanod Docs PDF Reorder 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).

Rearranges, duplicates, or removes pages in a PDF by specifying a new 1-based page order array

## Facts

- Endpoint: POST https://docs.tanod.dev/v1/pdf/reorder?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-reorder-f2dad6ee
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_VcUv32MTJoFslvudZ3rjs

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-reorder-f2dad6ee -d '<json body>'
```

Example prompt: Can you reorder the pages of this PDF so they go 3, 1, 2 — here's the file as a URL: https://example.com/mydoc.pdf — and give me back a download link instead of the raw base64?

## When to prefer this

Use this endpoint when you need to programmatically rearrange, remove, or duplicate pages within an existing PDF without re-generating content. It is the right choice when the input is already a PDF and the goal is purely structural reorganization. It handles large files (up to 20 MB via URL) and strips active/untrusted content as a safety measure, making it suitable for processing PDFs from untrusted sources.

## Known failure modes

- 422 page_out_of_range — a page number in the order array exceeds the document's actual page count
- PDF exceeds 20 MB (URL) or 10 MB decoded (base64) — request rejected
- Private, internal, or IP-literal host URLs are refused
- Malformed or password-protected PDFs may fail to process
- Neither url nor pdf_base64 provided — request invalid
- order array is empty or exceeds 500 items

## 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 reordered PDF either as inline base64 data or a 24-hour download URL, plus metadata: file name, byte size, page counts (input and output), list of any omitted pages, and a flag indicating whether untrusted/active content was removed from the PDF.

## 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."
  },
  "order": {
   "type": "array",
   "items": {
    "type": "integer",
    "maximum": 500,
    "minimum": 1
   },
   "maxItems": 500,
   "minItems": 1,
   "description": "The new page order as 1-based page numbers (at most 500), e.g. [3, 1, 2]. A page may be listed more than once (it is copied); a page that is not listed is left out. A number the document does not have is a 422 page_out_of_range."
  },
  "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": "reordered.pdf",
   "bytes": 73724,
   "pages": 6,
   "data_base64": "JVBERi0xLjcKJb/3... (trimmed: 98,300 base64 characters in the reply)",
   "content_type": "application/pdf"
  },
  "operation": "reorder",
  "input_bytes": 140815,
  "input_pages": 6,
  "output_bytes": 73724,
  "result_pages": 6,
  "omitted_count": 0,
  "omitted_pages": [],
  "untrusted_content": true,
  "active_content_removed": {}
 }
}
```

## More

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