{"uid":"cap_1bgTOGr7IcM9MEPefyXvm","slug":"invoice-document-ocr-vision-ai-extraction-b7dddd18","name":"Invoice Document OCR – Vision AI Extraction","description":"Extracts vendor name, tax ID, line items, net subtotal, VAT rates and payment details (IBAN, BIC) from an invoice image (PNG or JPEG, a public https URL or base64, up to 4 MB) sent straight to a Cloudflare Workers AI vision model. Model output is parsed as JSON and checked for the expected keys; unparseable output is an error, not a guess. Requires the env.AI binding.","url":"https://api.fadeandco.workers.dev/api/agent-intel/invoice-document-ocr?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"mime":{"type":"string","description":"With imageBase64: image/png or image/jpeg (default image/png)"},"imageUrl":{"type":"string","description":"Public https URL of the invoice image (PNG or JPEG), up to 4 MB"},"imageBase64":{"type":"string","description":"Or the image itself: base64 data (no data: prefix), up to 4 MB decoded"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","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.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_Zqab17Xu5IPotY-xrZ8nx","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Extracts structured invoice data (vendor, tax ID, line items, subtotal, VAT rates, IBAN, BIC) from a PNG or JPEG invoice image using Cloudflare Workers AI vision model","exampleAgentPrompt":"Can you extract all the invoice details from this image — vendor name, tax ID, line items, subtotal, VAT, and payment info like IBAN and BIC? Here's the URL: https://example.com/invoices/invoice-2024-001.png","exampleUseCases":[{"title":"Automated accounts payable ingestion","prompt":"I have a scanned invoice image at https://storage.mycompany.com/invoices/acme-may2024.jpg — can you pull out the vendor name, tax ID, all line items with amounts, the net subtotal, VAT rate, and any IBAN or BIC listed so I can import it into our accounting system?"},{"title":"VAT compliance verification","prompt":"Here's a base64-encoded PNG of a supplier invoice — extract the VAT rates and vendor tax ID so I can verify they match what was declared on the supplier's VAT return."},{"title":"Payment processing automation","prompt":"Extract the IBAN and BIC from this invoice image at https://invoices.vendor.eu/bill-00452.png so I can set up the bank transfer automatically without manually reading the PDF."}],"resultDescription":"A JSON object containing the extracted invoice fields: vendor name, tax ID, individual line items with descriptions and amounts, net subtotal, VAT rates, and payment details including IBAN and BIC. If the vision model output cannot be parsed as valid JSON with the expected keys, the endpoint returns an error rather than a partial or guessed result.","failureModes":["Image URL is not publicly accessible or returns non-200 — extraction fails","Image exceeds 4 MB limit — rejected","Image is not PNG or JPEG — unsupported format error","Vision model output is unparseable JSON — returns error, not a guess","Invoice image is too low resolution or blurry for reliable OCR — missing or incorrect fields","Handwritten or non-standard invoice layouts may cause incomplete field extraction","base64 data includes data: URI prefix — must be stripped before sending"],"whenToPreferThis":"Choose this endpoint when you need structured, machine-readable data extracted from invoice images (PNG or JPEG) and require specific financial fields like IBAN, BIC, VAT rates, and tax IDs — especially in EU/European invoicing contexts. Prefer this over generic OCR when you need JSON-structured output with validated keys rather than raw text, and when the invoice is image-based rather than a native PDF with embedded text.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T06:47:03.070Z","isFirstParty":false,"canonicalSlug":"invoice-document-ocr-vision-ai-extraction-b7dddd18"}