{"uid":"cap_ZMCoLKLQauJT0HeVDhhvJ","slug":"docparse-x402-document-ocr-4c0e7046","name":"docparse-x402 Document OCR","description":"Receipt, invoice, and fiscal-document OCR into structured JSON for AI agents. USDC on Base mainnet via Coinbase CDP facilitator.","url":"https://docparse-x402.f3rnandonhan.workers.dev/parse-document?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","required":["image","mimeType"],"properties":{"image":{"type":"string","description":"Base64-encoded image or PDF of the document (no data: prefix)"},"mimeType":{"type":"string","description":"e.g. image/jpeg, image/png, application/pdf"}}},"responseSchema":{"type":"object","properties":{"currency":{"type":["string","null"],"description":"ISO 4217 code, e.g. USD, BRL"},"confidence":{"type":"number","description":"0 to 1, your confidence in this extraction"},"line_items":{"type":"array","items":{"type":"object","properties":{"total":{"type":["number","null"]},"quantity":{"type":["number","null"]},"unit_price":{"type":["number","null"]},"description":{"type":"string"}}}},"tax_amount":{"type":["number","null"]},"vendor_name":{"type":["string","null"]},"total_amount":{"type":["number","null"]},"document_date":{"type":["string","null"],"description":"ISO 8601 date, if found"},"document_type":{"type":"string","description":"invoice, receipt, fiscal_note, or other"}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_5q6K6iO2ba5mVmLxdYvSw","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts structured JSON data (vendor, date, line items, totals, tax) from receipt, invoice, and fiscal-document images or PDFs using OCR","exampleAgentPrompt":"I have a JPEG photo of a restaurant receipt — can you parse it into structured JSON and pull out the vendor name, date, line items with prices, tax, and total amount?","exampleUseCases":[{"title":"Expense report automation","prompt":"I've got a stack of receipt photos from my business trip — can you extract the vendor name, date, line items, and total from each one so I can file my expense report?"},{"title":"Invoice ingestion for accounting","prompt":"Here's a base64-encoded PDF invoice from our supplier — parse it into structured data including the vendor, invoice date, all line items with unit prices and quantities, tax amount, and grand total."},{"title":"Fiscal note compliance check","prompt":"I have a Brazilian nota fiscal image in PNG format — extract all the structured fields from it, including the document type, currency, totals, and any line items, so I can verify it for our records."}],"resultDescription":"A JSON object containing: document_type (invoice, receipt, fiscal_note, or other), vendor_name, document_date (ISO 8601), currency (ISO 4217), line_items array (each with description, quantity, unit_price, total), tax_amount, total_amount, and a confidence score (0–1) indicating extraction reliability.","failureModes":["Invalid or corrupt base64 image data — returns error or low-confidence result","Unsupported MIME type — processing may fail or return empty fields","Handwritten or very low-resolution documents — confidence score will be low, fields may be null","Missing required fields (image or mimeType) — request rejected","Document is not a fiscal document (e.g. plain text page) — document_type returns 'other' with sparse fields","Payment failure or insufficient USDC balance — x402 payment error before processing"],"whenToPreferThis":"Choose this endpoint when you need structured JSON extraction from receipt, invoice, or fiscal-document images/PDFs with per-call micropayment pricing via USDC on Base. Ideal for expense automation, accounting pipelines, or compliance workflows where you need line-item detail, tax, and vendor data without a subscription. Prefer over generic OCR when you specifically need fiscal-document-aware field extraction with a confidence score.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-10T06:35:34.011Z","isFirstParty":false,"canonicalSlug":"docparse-x402-document-ocr-4c0e7046"}