Scan Single Document to Structured JSON
scan_documentExtract schema-validated JSON from supported documents—including IDs, invoices, receipts, and vehicle records—by routing each uploaded file to a specialized OCR endpoint.
Instructions
Extract schema-validated JSON from any of 19 specialized StructOCR single-document endpoints (1-3 credits depending on document type; supports JPG, PNG, WebP, HEIC, and PDF up to 4.5 MB — driver_license_pdf417 accepts JPG, PNG, WebP, HEIC). Zero Data Retention applies automatically on driver_license_pdf417, health_card, proof_of_address, and visa.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"document_type": "<document_type>",
"file": "<file>"
},
"name": "scan_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Local file path, base64 string, or data URL of the document (max 4.5 MB). | |
| accuracy | No | Receipt OCR only: "standard" (1 credit, default) or "enhanced" (2 credits). | |
| document_type | Yes | Target document type: driver_license_pdf417 (2cr, zero-retention), driver_license (2cr), passport (2cr), national_id (2cr), health_card (2cr, zero-retention), proof_of_address (2cr, zero-retention), visa (2cr, zero-retention), vin (1cr), vin_pro (2cr), license_plate (1cr), vehicle_registration (2cr), auto_insurance (2cr), invoice (3cr, up to 5 PDF pages), receipt (1cr standard / 2cr enhanced), container (1cr), bill_of_lading (3cr), weighbridge_ticket (2cr), atm_cassette (1cr), hin (1cr). | |
| response_version | No | Receipt OCR only: optional response schema version. |