# Tanod Docs PDF OCR

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

Performs OCR on a PDF to make it text-searchable, returning a searchable PDF with extracted text

## Facts

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

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-ocr-a85ac549 -d '<json body>'
```

Example prompt: Can you OCR this scanned PDF for me — use the URL https://example.com/invoice.pdf, process pages 1-3 at 200 DPI in English, and return a download link to the searchable PDF instead of the raw base64?

## When to prefer this

Choose this endpoint when you need to make a scanned or image-based PDF text-searchable using OCR, especially when you want to preserve the original PDF format while adding an invisible text layer. Prefer this over general document conversion endpoints when the specific goal is optical character recognition on PDFs, particularly for invoices, contracts, or scanned archives. Use the url output mode when the resulting file would be large and you want to avoid bloating the agent context window with base64 data. The skip_text option makes it efficient for mixed documents that are partly already searchable.

## Known failure modes

- PDF URL exceeds 20 MB size limit — request rejected
- URL points to a private, internal, or IP-literal host — refused
- More than 10 pages requested in the page range — validation error
- DPI value outside 100-300 range — validation error
- More than 5 pages submitted with DPI above 200 — may be rejected or throttled
- Unsupported Tesseract language code provided — error returned
- Both url and pdf_base64 omitted — missing input error
- PDF base64 exceeds 10 MB decoded — request rejected

## 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 searchable PDF (either as a base64-encoded file or a 24-hour download URL), the extracted text string, list of pages that were OCR'd, list of pages skipped because they already had text, DPI and language used, input/output byte sizes, and a flag indicating if any active content was removed for security.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "dpi": {
   "type": "integer",
   "default": 200,
   "maximum": 300,
   "minimum": 100,
   "description": "100-300 (default 200); at most 200 for more than 5 pages."
  },
  "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."
  },
  "lang": {
   "type": "string",
   "default": "eng",
   "pattern": "^[a-z][a-z_]{1,15}(\\+[a-z][a-z_]{1,15}){0,2}$",
   "maxLength": 50,
   "minLength": 3,
   "description": "Installed tesseract languages only, '+'-joined (eng today)."
  },
  "pages": {
   "type": "string",
   "pattern": "^[0-9a-zA-Z ,\\-]+$",
   "maxLength": 200,
   "minLength": 1,
   "description": "Pages to OCR, at most 10, each part N, N-M, -M or last (no open N- ranges), e.g. 1-3,7. At most 5 pages is the lower price."
  },
  "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."
  },
  "skip_text": {
   "type": "boolean",
   "default": true,
   "description": "Leave pages that already have text alone."
  },
  "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": {
  "dpi": 200,
  "file": {
   "name": "searchable.pdf",
   "bytes": 15472,
   "pages": 1,
   "data_base64": "JVBERi0xLjQKJb/3... (trimmed: 20,632 base64 characters in the reply)",
   "content_type": "application/pdf"
  },
  "lang": "eng",
  "text": "Dummy PDF file",
  "ocr_pages": [
   1
  ],
  "operation": "ocr",
  "input_bytes": 13264,
  "input_pages": 1,
  "output_bytes": 15472,
  "text_truncated": false,
  "skipped_has_text": [],
  "untrusted_content": true,
  "active_content_removed": {}
 }
}
```

## More

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