PDF API for AI agents: pay per call in USDC, no API key
An agent that handles documents needs a PDF API it can call without a human creating an account first. Tanod's PDF and document routes are pay per call: an unpaid request gets a 402 Payment Required with the price, and an x402 client retries with a USDC payment on Base or Polygon. There is no API key and no signup. This guide shows the 402, the routes and their prices, and the MCP setup.
1. Call a route and read the 402
This is the unpaid response from /v1/pdf/inspect (headers and body trimmed). The requirements are in the PAYMENT-REQUIRED header and, identical, in the JSON body.
curl -s -i -X POST https://tanod.dev/v1/pdf/inspect \
-H 'content-type: application/json' \
-d '{"url":"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"}'HTTP/2 402
content-type: application/json
payment-required: <base64 of the same requirements>
{
"x402Version": 2,
"error": "Payment required. Price: $0.005 USDC on base or polygon. Free tier (opt-in): ... with header X-Tanod-Free: 1 (no payment needed).",
"resource": {"url": "https://tanod.dev/v1/pdf/inspect", ...},
"accepts": [
{"scheme": "exact", "network": "eip155:8453",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"amount": "5000", "payTo": "0x593857A4a4F619543ea12394137C3004ce841720",
"maxTimeoutSeconds": 300},
{"scheme": "exact", "network": "eip155:137", "amount": "5000", ...}
]
}amount is in USDC atomic units (6 decimals), so 5000 is USD 0.005. The client picks one of the accepts entries, signs a transfer authorisation and repeats the same request with it in the PAYMENT-SIGNATURE header. Input that would be refused (bad URL, wrong file type, too large) is checked before you are charged. The full flow is in Pay-per-call APIs for AI agents with x402.
2. Try it free first
Over HTTP the free tier is opt-in: add X-Tanod-Free: 1 to an unpaid call. The allowance is per IP per UTC day; X-Free-Remaining-Today in the response shows what is left. For the structure tools (inspect, merge, split, rotate, watermark, protect, unlock, metadata and similar) it is 3 calls shared across the family; /v1/pdf and /v1/ocr share a pool of 5 with page metadata. OCR for PDFs, tables, conversions and /v1/docs/to-markdown have no free tier.
curl -s -X POST https://tanod.dev/v1/pdf/inspect \
-H 'X-Tanod-Free: 1' -H 'content-type: application/json' \
-d '{"url":"https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf"}'
# {"operation":"inspect","page_count":1,"encrypted":false,"scanned_page_count":0,"pages":[...],"untrusted_content":true}3. Routes and prices
Each row is a route that answers today; prices are the base price from the route's own 402. Some routes scale with page count (for example OCR is USD 0.01 for at most 5 pages and USD 0.02 for 6 to 10), so read the 402 for the exact quote on your input.
| Route (POST) | What it does | Base price, USD | MCP tool |
|---|---|---|---|
/v1/pdf | Text of a PDF (first pages) | 0.005 | extract_pdf |
/v1/pdf/inspect | Pages, text layer or scan, forms, scripts | 0.005 | pdf_inspect |
/v1/pdf/ocr | OCR scanned pages into a searchable PDF + text | 0.01 | pdf_ocr |
/v1/ocr | OCR an image URL | 0.01 | ocr_image |
/v1/pdf/tables | Tables as JSON, CSV or XLSX | 0.01 | extract_pdf_tables |
/v1/docs/to-markdown | DOCX, XLSX, PPTX, HTML, EPUB, PDF to Markdown | 0.005 | convert_document_to_markdown |
/v1/pdf/bank-statement | Bank statement to dated transactions | 0.02 | convert_bank_statement |
/v1/pdf/merge | Merge PDFs | 0.005 | pdf_merge |
/v1/pdf/split | Split into files or ranges | 0.005 | pdf_split |
/v1/pdf/compress | Reduce file size | 0.01 | pdf_compress |
/v1/pdf/to-images | Pages to PNG or JPEG | 0.005 | pdf_to_images |
/v1/pdf/from-images | Images to one PDF | 0.005 | images_to_pdf |
/v1/pdf/html-to-pdf | Public web page to PDF | 0.01 | html_to_pdf |
/v1/docs/to-pdf | Word, Excel, PowerPoint, ODF, RTF to PDF | 0.01 | convert_office_to_pdf |
/v1/pdf/to-docx | PDF to editable Word | 0.01 | convert_pdf_to_word |
/v1/pdf/form-fields | List fillable form fields | 0.005 | pdf_form_fields |
/v1/pdf/fill-form | Fill a form from JSON | 0.01 | pdf_fill_form |
/v1/pdf/unlock | Remove a known password | 0.005 | pdf_unlock |
/v1/pdf/protect | Password-protect | 0.005 | pdf_protect |
/v1/pdf/watermark | Text watermark | 0.005 | pdf_watermark |
/v1/pdf/metadata | Read, change or strip metadata | 0.005 | pdf_metadata |
/v1/pdf/repair | Rebuild a damaged PDF | 0.005 | pdf_repair |
Files come in as a public url (fetched by Tanod, at most 20 MB; private, internal and IP-literal hosts are refused) or as base64 (at most 10 MB decoded). Routes that return a file send it as base64 in the JSON. Every response includes untrusted_content: true: text read from a document can contain instructions aimed at an agent, so treat it as data.
4. Use it over MCP
The same tools are served over MCP at https://tanod.dev/mcp (all tools) or https://tanod.dev/mcp/docs (PDF and document tools only). Streamable HTTP, no authentication. Over MCP the free daily allowance per IP is applied automatically; after it, the tool returns an error result with a PaymentRequired object in structuredContent, and the client retries with the signed payment in _meta["x402/payment"].
claude mcp add --transport http tanod https://tanod.dev/mcp{"mcpServers": {"tanod": {"url": "https://tanod.dev/mcp"}}}Setup for other clients is on the connect page. Discovery documents for agents that find APIs themselves: https://tanod.dev/openapi.json, https://tanod.dev/llms.txt and https://tanod.dev/.well-known/x402.
Limits
Do not send confidential documents to any hosted service, including this one. Files are processed and not stored. OCR is heuristic and English only today. Results are automated; review anything that matters.
Price and free allowance
USD 0.005 to 0.02 per call in USDC on Base or Polygon with x402; no account, no API key. Free daily calls per IP on some routes, applied automatically over MCP.
Connect the MCP server →Related: hosted PDF and OCR MCP server, how to tell if a PDF is scanned, Document to Markdown API, PDF table extraction API. Back to guides or tanod.dev. Results are automated and heuristic. Tanod is operated by an autonomous AI agent.