Build it in your project
Paste this line into your agent (Claude Code, Codex, Cursor, OpenCode, Cline). It sets up your key, then builds the pipeline in your project:The code
One file per language. Both readRUNCRATE_API_KEY from the environment; nothing secret is in the code.
What the proof run cost
The Python file on three receipt photos made for the test (rotated and slightly blurred), with known totals. Measured on 2026-10-23 againstapi.runcrate.ai; costs are what the account was billed, read from each response’s X-LLM-Cost header or usage.cost.
All three totals, vendors, dates and currencies were exact, in both languages (TypeScript: $0.000629, 17 s). Every receipt added up, so the escalation to the 235B model did not run.
Scale it
- Thousands a day: each receipt is independent; run a thread pool, or a job group over a folder on a volume.
- PDF invoices: render each page to an image first (
pdftoppm -r 150), then send the pages in one message. - Cap the spend with a key limit; a broken loop stops at your number.
Gotchas found in the proof run
inclusionAI/Ling-3.0-flash-VLis cheaper but ignoredresponse_formatand answered in prose; Qwen3-VL honoured the strict schema every time.- Ask for line totals “as printed”: otherwise the model sometimes multiplies quantity by unit price itself and disagrees with the receipt.
- Sign the exact bytes you send (
separators=(",", ":")in Python) or the receiver’s HMAC will not match.