Hand it an invoice. Watch it become a bill.
AI reads the document. Plain code checks every number. Only a bill that adds up gets posted to QuickBooks.
Try the pipeline
Posted to QuickBooks as bill 151
What the AI read
- Vendor
- Delta Ag Supply, Inc.
- Invoice
- DAS-1042
- Dated
- 2026-10-12, due 2026-11-11 (Net 30)
| Item | Qty | Price | Amount |
|---|---|---|---|
| Seed corn, 80K bag | 12 | $289.50 | $3,474.00 |
| Starter fertilizer 10-34-0, tote | 3 | $41.15 | $123.45 |
| Fungicide, 2.5 gal | 4 | $86.20 | $344.80 |
| Subtotal | $3,942.25 | ||
| Tax | $0.00 | ||
| Total | $3,942.25 | ||
What landed in the books
- Bill
- 151
- Ref no.
- DAS-1042-085e
- Vendor
- Delta Ag Supply, Inc.
- Lines
- 3
How it was decided
6 steps · 1 by AI- CODEConfirmed a person is running this (Turnstile)
- CODERate limit: run 1 of 10 this hourKeeps one visitor, or one script, from using up the day's budget.
- CODESized the document: 2,757 tokens, worst case $0.05$0.25 of today's $0.25 budget is left, enough for the worst case, so it runs live.
- AIRead the document into the invoice schemaFast, cheap model first; most documents need nothing more.Claude Haiku 5.52,757 in, 250 out, $0.0004, 2.2 s
- CODEChecked the math and records: all 7 passed
- CODEPosted bill 151 to the QuickBooks Online sandboxEvery check passed, so no person needs to look at it.
Where the AI stops and the code takes over
Read
A small, fast model reads the PDF, photo, or email and fills in a fixed form: vendor, dates, terms, every line, the totals. It's told to copy numbers exactly as printed, even wrong ones. Fixing them isn't its job.
Check
Seven checks, none of them AI. Each line's quantity times price, the lines against the subtotal, subtotal plus tax against the total, a real date, an approved vendor, and no invoice posted twice. Money is compared in cents, so rounding never decides a pass.
Retry, sometimes
If the math or the date fails, a stronger model reads it once more, since a misread digit is the usual cause. An unknown vendor or a duplicate gets no retry. A better reader can't fix those, so paying for one would be waste.
Route
Everything passes: it posts, no person needed. Anything still fails: it goes to a review queue with the failing check named. Posting a bill that doesn't add up costs more than a minute of someone's time.
Post
The bill goes to QuickBooks Online through Intuit's API, vendor matched or created, tax on its own line so the total matches the paper. Access tokens refresh on their own, and a rotated refresh token is saved before it's ever used.
What keeps a public AI demo from running up a bill
- A bot check first
- Cloudflare Turnstile runs before anything that costs money. A script without a passing token never reaches the AI.
- Ten runs an hour
- Per connection. A run counts when it starts, so retrying in a loop isn't free either.
- A daily budget, sized before each run
- The document's tokens are counted first, for free, and the run's worst case is set aside. If it won't fit, samples replay their last real run and uploads wait until tomorrow.
- Uploads checked by their bytes
- File type comes from the file's own first bytes, not its name. Up to 4 MB and about five pages, read in memory and never written anywhere.
- Documents are data, not orders
- The order email carries a note asking the AI to skip the checks. It doesn't matter what the AI thinks of that: the checks are code, and they run anyway.
- A sandbox, not real books
- Bills post to a QuickBooks Online sandbox company we own. Visitors never sign in to anything, and the sample documents are made up.
What a document costs to process
A clean one-page invoice, read once by the small model.
The invoice with a math error: read twice, the second time by the stronger model, then sent to review.
This demo's whole daily AI budget, for every visitor combined.
Measured on our own test runs in October 2026 at list prices. Each run on this page shows its own cost in the steps above.
Want this pointed at your paperwork?
Invoices, packing slips, order emails, into whatever system you run. Built the same way: AI where it reads, code where it decides.