Document extraction, in practice
What things cost, what breaks in production, and how to build the pipeline properly. Written for developers, with numbers we measured ourselves.
5 min readExtraction that verifies: numbers, codes and IDs
Reading a page is a model job. Computing, decoding, validating and formatting are not, and Veralens does them in code afterwards. What that changes, field by field.
ReadExtract QR codes and barcodes, decoded not guessed
A model reading a QR code from pixels is pattern matching on a grid and will return a plausible wrong payload. Veralens decodes symbols with a real decoder, and returns null when there is none.
Read5 min readStop letting a language model do your arithmetic
Totals a model works out in its head fail in the last decimal, which looks right and reconciles wrong. How calculated fields are computed in code instead, and how to pin money to two decimals.
Read6 min readIBANs, countries and dates: normalized or left alone
Countries to ISO codes, IBANs verified by checksum, phones to E.164, dates to ISO 8601. And the rule that makes it safe: anything that does not resolve comes back exactly as printed.
Read7 min readBuild a Cal AI clone: meal photo to calories and macros
A meal photo becomes calories and macros in two jobs with a free nutrition lookup between them. The full recipe, including what you still have to build.
Read5 min readBuild a receipt scanner and bill splitter
One job turns a receipt photo into typed line items and a decoded fiscal QR. Then split it to the exact cent with about fifteen lines of your own code.
Read5 min readBuild a pantry tracker on barcodes and expiry dates
One photo gives you a decoded barcode and an ISO expiry date per product. Open Food Facts fills in the rest, free and with no key. The whole pipeline.
Read5 min readBuild a business card scanner that writes to your CRM
Front and back of a card in one job returns E.164 phones, ISO country codes and a decoded QR. Then one POST to your CRM. Here is the whole pipeline.
Read8 min readBest OCR model in 2026: how to choose
Transcription and extraction are different jobs with different winners. What the benchmarks measure, the four ways a score misleads, and what to use when you need typed fields.
Read6 min readHow to parse unstructured data properly
Skip the classify, route and normalize pipeline. One schema with a typed branch per document shape handles a mixed batch in a single call, and returns values already typed.
Read7 min readPDF to JSON: how to actually get structured data out
Digital PDFs and scanned PDFs are different problems. Code for both routes, why page one is not the document, and the checks that catch errors before they reach your database.
Read6 min readOCR vs LLM extraction: which one you need
OCR reads characters, extraction decides what they mean. When plain OCR is the cheaper right answer, when you need a schema, and the two weaknesses of the OCR then LLM pipeline.
Read6 min readWhat document extraction costs per 1,000 pages
Published rates hide extract surcharges and creative page definitions. Here is what a page costs on Veralens, measured across 1,651 real pages, and how the market compares.
Read5 min readYour function times out before the document finishes
Extraction takes 3 seconds on a good page and 17 on a bad one, so long documents outlive the request. Why bigger timeouts and retries make it worse, and the job pattern that fixes it.
Read7 min readExtract invoice data as typed JSON with a schema
A working guide to invoice extraction with a JSON Schema: which fields to mark required, how to send a PDF, reading the result, and the four things that actually go wrong.
Read