Quoting a per-document price you can defend
Somebody needs a number before the project starts. How to build one from measurable parts, and the three multipliers that make naive estimates wrong.
Somebody has to put a number in a proposal before any code exists. The usual approach is to process one document, read the token counts, multiply by volume, and add a margin.
That number is reliably too low, by somewhere between two and four times, and it is too low for three reasons that are all knowable in advance.
The cost of a document is not the cost of extracting it once successfully. It is the cost of every attempt, plus the review, plus the eventual reprocess.
Start with the measurable part
Take twenty representative documents — sampled, not chosen — and measure:
// Not an estimate. Run it and record what the API reports.
const measured = await Promise.all(sample.map(async (doc) => {
const res = await extract(doc)
return {
imageTokens: res.usage.input_tokens - INSTRUCTION_TOKENS,
instructionTokens: INSTRUCTION_TOKENS,
outputTokens: res.usage.output_tokens,
pages: doc.pageCount,
}
}))
For a typical single-page A4 scan on a standard-tier model:
image: ~1,560 tokens (see the patch formula)
instructions: ~800 tokens (schema + prompt, identical every call)
output: ~600 tokens (the structured record)
At Claude Haiku 4.5 rates, $1/MTok in and $5/MTok out:
input: 2,360 × $1 / 1M = $0.00236
output: 600 × $5 / 1M = $0.00300
---------
$0.00536 per document
$5.36 per thousand. That is the number people put in the proposal, and it is the best case.
Multiplier one: retries
Some share of calls fail — schema validation, rate limits, timeouts, server errors — and each failure is billed in full. Retries are typically 8–25% of spend in a pipeline nobody has tuned.
Budget 15% until you have measured your own:
$0.00536 × 1.15 = $0.00616
Multiplier two: pages
The sample is single-page. Real corpora are not, and multi-page documents cost more than proportionally — every page carries an image, and later pages carry forward context.
Use the measured page distribution, not the mean:
70% × 1 page = 0.70
20% × 2 pages = 0.40
8% × 3 pages = 0.24
2% × 6 pages = 0.12
----
1.46 average pages, weighted
A mean of 1.46 rather than 1. Note this is not the same as "average page count" casually computed — the tail matters, and a corpus with a few 40-page contracts shifts it substantially.
$0.00616 × 1.46 = $0.00899
Multiplier three: reprocessing
Over a year, the prompt will change. Some of those changes will justify reprocessing part of the corpus.
Two or three partial backfills covering perhaps 30% of documents each is roughly a 0.75× uplift over the year, and at batch rates that halves to about 0.35×:
$0.00899 × 1.35 = $0.01214
The line that dwarfs the tokens
Then the review queue, which is not a token cost at all and is usually larger than everything above combined.
At a 6% review rate, a reviewer at $25/hour, and a well-designed field-level interface at ten seconds per item:
0.06 × ($25 / 360 reviews per hour) = 0.06 × $0.069 = $0.0042 per document
Add it:
model: $0.01214
review: $0.00420
--------
$0.01634 per document
Three times the naive figure. And note that the review line is entirely decided by interface quality — at sixty seconds per item instead of ten it becomes $0.025 and dominates the whole calculation.
The quotable number
$16.34 per thousand documents, all-in
At 40,000 documents a month that is $654. Quote a range around it — the distribution of your sample is the main uncertainty — and state the assumptions in the proposal:
Assumes 1.46 average pages, 15% retry overhead, 6% review rate at 10 seconds per review, and two partial reprocessing passes per year. Model costs at published rates as of August 2026; note that some providers have scheduled increases.
That last clause matters for anything running past the new year — one provider's introductory pricing ends on 1 January 2027 and doubles.
What moves it most
In order:
- Review interface quality. 6× swing on the largest non-token line.
- Output token count. Output is 5× the input price; trimming fields nobody reads is the biggest model-side lever.
- Model and resolution tier. A high-resolution model can triple the image line.
- Retry rate. Mostly fixable with native structured output.
- Batch versus synchronous. A flat 50% if nothing is waiting.
Note what is not on that list: the per-token price of the model, in isolation. Switching providers to save 20% on tokens changes the total by a few per cent. Halving the review time changes it by a third.
More in what an AI feature costs to build, scope it as a measurement, and when the model bill triples.