Extract invoice
extract.invoiceSend a PDF or a photo of an invoice and get vendor, invoice number, dates, line items, taxes and totals back as JSON that matches your schema. It runs on our own CPUs, so the document never leaves our servers.
On our 1,200-invoice test set, local model only
3 on Pro, 2 on Team. Failed pages are free.
Unless you ask for quality: premium
From scan to JSON
A real result from the dashboard runner. Every field carries a confidence score and the page region it came from.
{ "vendor": { "name": "Halden Supply GmbH", "vat_id": "DE318842011" }, "invoice_number": "HS-2026-11-2291", "issue_date": "2026-11-28", "due_date": "2026-12-28", "currency": "EUR", "line_items": [ { "description": "Anodised bracket, M6", "qty": 400, "unit_price": 1.85 }, { "description": "Hex bolt set, stainless", "qty": 120, "unit_price": 4.20 }, { "description": "Freight, pallet", "qty": 1, "unit_price": 86.00 } ], "subtotal": 1330.00, "tax": [{ "rate": 0.19, "amount": 252.70 }], "total": 1582.70, "checks": { "totals_add_up": true, "min_confidence": 0.93 }, "meta": { "pages": 1, "credits": 3, "engine": "local" } }
Watch a call
The REST call your code makes. The MCP tool your agent calls is the same, with the same schema.
How it runs
Four steps on our servers for every page. The fourth only happens if you ask for it.
Read the page
Digital PDFs keep their text layer. Scans go through local OCR with layout detection.
PaddleOCR, DoclingFill your schema
Qwen3 4B fills the JSON schema under a grammar, so the output always parses.
Qwen3 4B on CPUCheck the maths
Line items, tax and totals are re-added. Dates and VAT IDs are validated.
Rules, 0 creditsPremium, if asked
With quality: premium, low-confidence pages go to Claude Sonnet 5.5 and are billed as tokens.
OptionalInput
Typed inputs your model sees through MCP, and the same JSON over REST.
| Field | Type | Required | Description |
|---|---|---|---|
file | file | url | Yes | PDF, PNG, JPG, TIFF or HEIC. Up to 20 MB and 50 pages per call. |
schema | JSON Schema | No | Your own fields. Defaults to our accounts-payable invoice schema. |
language | string | No | Hint such as de or fr. Detected when left out. |
quality | "standard" | "premium" | No | Premium routes low-confidence pages to Claude Sonnet 5.5, billed as metered tokens. |
keep_file | boolean | No | Off by default: the file is dropped from memory as soon as the call returns. |
Call it from anywhere
Same tool, same schema. Pick how your agent connects.
// Your agent finds the tool with search_tools, then calls it through execute_tool { "name": "execute_tool", "arguments": { "tool": "extract.invoice", "input": { "file": "https://files.northwind.dev/ap/halden-2291.pdf", "quality": "standard" } } }
curl https://api.orrerie.ai/v1/tools/extract.invoice/execute \ -H "Authorization: Bearer $ORRERIE_KEY" \ -F file=@halden-2291.pdf \ -F 'schema=@ap-invoice.json'
import { Orrerie } from "@orrerie/sdk"; const orr = new Orrerie({ apiKey: process.env.ORRERIE_KEY }); const invoice = await orr.tools.run("extract.invoice", { file: await fs.readFile("halden-2291.pdf"), }); console.log(invoice.total, invoice.currency); // 1582.7 "EUR"
Try it on your own invoice
The Free plan includes 3,000 credits a month. That is 600 invoice pages.