Invoice OCR
eu_einvoice_from_scanInvoice OCR: turn a scanned or photographed invoice (JPEG, PNG, WebP, TIFF) or a non-structured PDF (text layer or embedded scan images, max 3 pages, 4 MB) into structured JSON with per-field confidence: invoice number, dates, seller/buyer name and address, VAT ID, tax number, HRB, IBAN (checksum-validated, bank/BIC from the Bundesbank directory), BIC, payment terms and due date, net/VAT/gross totals, VAT breakdown, § 19 / reverse-charge hints and line items. Cross-checks the arithmetic (line sum = net, basis × rate = VAT, net + VAT = gross) and flags inconsistencies. Nothing is guessed: unreadable fields are null with confidence 0. Optional xrechnung=cii|ubl builds an XRechnung 3.0 / EN 16931 XML via the official schematron and returns validation errors or the list of missing business terms instead of inventing data. German and English invoices. Send the file as raw body (Content-Type image/jpeg, image/png, image/webp, image/tiff or application/pdf) or JSON {base64} / {url}. No charge (HTTP 4xx/422) if no text can be read. Price: $0.04 USDC per call via 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": "eu_einvoice_from_scan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | public http(s) URL of the image or PDF | |
| base64 | No | base64 of a JPEG/PNG/WebP/TIFF image or PDF (alternatively POST the raw file with its Content-Type) | |
| profile | No | profile for the generated XML (default xrechnung) | |
| leitwegId | No | buyer reference / Leitweg-ID (BT-10) if not printed | |
| xrechnung | No | also generate and validate an XRechnung/EN 16931 XML from the extracted data (query parameter when posting a raw file) | |
| buyerEmail | No | buyer electronic address (BT-49), usually not printed on the invoice |