Document to JSON (text + tables in one call)
document_to_jsonRead a whole document in one call: all the text (OCR for scans and photos, exact text for digital PDFs) plus every table as rows of cells. Use when processing invoices, receipts, bank statements, contracts or reports and you need both the wording and the numbers. Send {url} or {base64}, optional lang. PDF or image, max 20 MB, 20 pages of text, 50 of tables. Returns {type, pages, method, text, tables:[{page, rows}]}. Errors: 400 bad input. Price: $0.02 USDC per call (x402).
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "document_to_json"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | Public URL of the file. Provide url OR base64. | |
| lang | No | OCR language code(s), e.g. eng or eng+fra | |
| base64 | No | File contents, base64-encoded (max 20 MB). Provide url OR base64. |