The cheapest way to process a million PDF pages¶
A million pages costs $10,000. Or $2,000. The difference is routing.
Measured on the same 1,651 OmniDocBench pages: Reducto $0.010 a page at list price, ReadAnyDoc with
Claude
Haiku $0.0045, the same model alone $0.0021. Born-digital pages with a clean text layer cost $0 if you
read the text yourself.
Most of the bill is pages that never needed a model. Send only the hard ones.
What a million pages costs¶
| Route | Per page | A million pages | Median seconds a page |
|---|---|---|---|
| Text layer only (PyMuPDF), clean born-digital pages | $0 | $0, your CPU | under a second (not timed) |
Claude Haiku alone (ReadAnyDoc mode="model-only") |
$0.0021 | about $2,100 | 26 |
| ReadAnyDoc engine (Haiku + layout, OCR checks, citations) | $0.0045 | about $4,500 | 35 |
| Reducto r-1, list price | $0.010 | about $10,000 | 6 |
The last three rows were measured by us on OmniDocBench (1,651 pages of papers, slides, books, forms and newspapers);
method and results. Reducto's r-1 mini ($0.001 a page) was not measured. Your pages
will differ: scanned pages with tables and handwriting cost more (up to about $0.03 a page with ReadAnyDoc).
1. Route each page¶
import pymupdf # pip install pymupdf
def route(pdf_path, min_chars=200):
"""Split a PDF's pages into those with a usable text layer and those that need a model to read them."""
text_pages, image_pages = [], []
for page in pymupdf.open(pdf_path):
n = len(page.get_text().strip())
has_tables = bool(page.find_tables().tables)
if n >= min_chars and not has_tables:
text_pages.append(page.number + 1)
else:
image_pages.append(page.number + 1) # scans, near-empty pages, pages with tables
return text_pages, image_pages
Text-layer pages: page.get_text() and you are done. The rest go to a model.
2. The trap: old scans carry text layers too¶
We ran that function on the two sample documents in our repo. The Loan Estimate went to the model (it has tables). The 1904 printer's invoice passed as a text page: it is a scan, but someone ran OCR on it years ago and left the result inside the PDF. That text layer reads:
Telephones \J"l-Fi'b'rt U-,2
I Keystone-'Race 7-49 Philadelphia, J&X. 1st ICJO 4
To Urntlap Printing do.
The date and the company name are wrong, and nothing in the PDF says so. A length check cannot tell. Before trusting
a text layer at scale, check it: compare it with a fresh OCR of a sample of pages, or count words that are not in a
dictionary. ReadAnyDoc's first stage does this for every page (it scores the text layer against its own OCR and
classes it trustworthy, ocr_layer, stale_ocr, garbage or none) and only copies characters from layers
it trusts.
3. Pick the cheapest reader that is good enough for the rest¶
| You need | Use | Why |
|---|---|---|
| Text for search or RAG, few tables | the model alone | half the engine's cost; on |
| Block types, positions, citations, long tables | the engine | layout block types right 83.4% of the time against 55.6% for the model alone |
| Answers in seconds | a hosted parser | the vision-model routes take 20-50 seconds a page |
import readanydoc
cheap = readanydoc.parse("scan.pdf", mode="model-only") # about $0.002 a page
full = readanydoc.parse("scan.pdf") # about $0.0045 a page, with layout and citations
print(full.usage.cost_usd) # what this document actually cost
4. Other levers¶
- Provider batch pricing. If you call the model yourself,
Anthropic's Message Batches API is half the price of live calls, in exchange for results within hours instead of seconds. ReadAnyDoc's library calls the live API.
- Do not re-parse. Store the output with a hash of the file; most pipelines parse the same documents again.
- Pages, not documents. Ask for
pages=[1, 2]when you only need the first pages (cover sheets, summaries). - Self-hosted vision models. Cost moves from per page to per GPU hour. Worth it above a few million pages a month
if you have the people to run it;
Docling, Marker and MinerU run locally too
(compared).
Questions¶
What is the cheapest way to process a million pages of PDFs with an LLM? Do not send all of them. Read clean text layers for free, check that those layers are not old OCR, and send only scans and table pages to a vision model. How much that saves depends on your mix: the share of clean born-digital pages is the number to measure first.
Is a vision model cheaper than a parsing API? On our measurements, yes: $0.0021-0.0045 a page against $0.010 for Reducto's standard parse. It is also slower.
Does ReadAnyDoc charge per page? No. It is free and open source (Apache-2.0); you pay your model provider. Pricing and licence.