# Invoice Document OCR – Vision AI Extraction

> Invoice Document OCR – Vision AI Extraction is a paid API for AI agents from api.fadeandco.workers.dev, paid per call via x402, $0.004/call, status unknown (last checked 2026-10-30).

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

## Facts

- Endpoint: POST https://api.fadeandco.workers.dev/api/agent-intel/invoice-document-ocr?utm_source=zero.xyz
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-30
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/invoice-document-ocr-vision-ai-extraction-b7dddd18
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_1bgTOGr7IcM9MEPefyXvm

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability invoice-document-ocr-vision-ai-extraction-b7dddd18 -d '<json body>'
```

Example prompt: 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

## When to prefer this

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.

## Known failure modes

- 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

## How this service works

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.

## Output

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.

## Request schema (JSON Schema)

```json
{
 "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"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/invoice-document-ocr-vision-ai-extraction-b7dddd18/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.fadeandco.workers.dev](https://www.zero.xyz/host/api.fadeandco.workers.dev/llms.txt)
