Extract invoice

extract.invoice

Send 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.

Runs on our CPUs Data never leaves our server 5 credits per page About 4 s per page Premium option
Median time per page
3.8 s
Field accuracy
97.4%

On our 1,200-invoice test set, local model only

Credits per page
5

3 on Pro, 2 on Team. Failed pages are free.

Outside API calls
0

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.

app.orrerie.ai / Run a tool / extract.invoice
response.json200 in 3.7 s
{
  "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.

zsh, api.orrerie.ai
curl -s https://api.orrerie.ai/v1/tools/extract.invoice/execute -H "Authorization: Bearer $ORRERIE_KEY" -F file=@halden-2291.pdf -F 'schema=@ap-invoice.json'
{ "status": "ok", "took_ms": 3712, "engine": "local", "credits": 3,
"result": { "vendor": { "name": "Halden Supply GmbH" }, "invoice_number": "HS-2026-11-2291",
"total": 1582.70, "currency": "EUR", "checks": { "totals_add_up": true } } }

How it runs

Four steps on our servers for every page. The fourth only happens if you ask for it.

1

Read the page

Digital PDFs keep their text layer. Scans go through local OCR with layout detection.

PaddleOCR, Docling
2

Fill your schema

Qwen3 4B fills the JSON schema under a grammar, so the output always parses.

Qwen3 4B on CPU
3

Check the maths

Line items, tax and totals are re-added. Dates and VAT IDs are validated.

Rules, 0 credits
4

Premium, if asked

With quality: premium, low-confidence pages go to Claude Sonnet 5.5 and are billed as tokens.

Optional

Input

Typed inputs your model sees through MCP, and the same JSON over REST.

FieldTypeRequiredDescription
filefile | urlYesPDF, PNG, JPG, TIFF or HEIC. Up to 20 MB and 50 pages per call.
schemaJSON SchemaNoYour own fields. Defaults to our accounts-payable invoice schema.
languagestringNoHint such as de or fr. Detected when left out.
quality"standard" | "premium"NoPremium routes low-confidence pages to Claude Sonnet 5.5, billed as metered tokens.
keep_filebooleanNoOff 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" }
  }
}

Try it on your own invoice

The Free plan includes 3,000 credits a month. That is 600 invoice pages.