Own Weights

LLM cost per document: why it beats cost per token

LLM cost per document is the number to budget for batch work. Here is why it beats cost per token, and how to measure it on your own documents.

Updated

Cost per document is what you pay to process one document, from input to finished output. It is the number to budget against when your work arrives as files, because document length varies and token counts follow length. Token prices are the easiest figure to find, and on their own they say the least about what a batch will cost.

Why a token price cannot rank models for batch work

A pricing page lists cost per token. It does not list tokens per document, and your invoice depends on that number. A model with a lower token price can cost more per document if it reads more text, writes longer answers, or fails a parse and runs again. A model with a higher token price can cost less if it answers briefly and gets the answer right the first time.

A document pipeline has three cost inputs: the price per token for input and output, the tokens each document uses (including the instructions and examples you send with it), and the retries and fallback calls. Multiply price by tokens for each document, add the cost of retries, and divide by the number of documents. That single figure can be compared across models.

A worked example with one document

The numbers here are illustrative arithmetic, not measurements. Two models read the same 6,000-token document with the same prompt.

  • Model A costs $1 per million tokens and writes 19,000 tokens of output, because it explains each step.
  • Model B costs $2 per million tokens and writes 400 tokens of output.

Model A processes 6,000 + 19,000 = 25,000 tokens, which is $0.025 per document. Model B processes 6,400 tokens, which is $0.0128 per document. Model A has the lower token price and costs about twice as much per document, because it writes nearly 50 times as many output tokens. Across 1,000 documents that is $25.00 against $12.80. If Model B needs a second run on 10 percent of documents, its total rises to $14.08, and Model A still costs more.

What one measured run shows

In one of our benchmark runs, per 1,000 documents, the cost was $3.54 on our Standard tier, $4.50 on Accuracy, $4.95 on Claude Haiku and $154.49 on Claude Opus, with Claude billed at list price for the tokens it used. See the full results. The order by token price was the same in this sample, but the size of each gap depends on how long your documents are and how much each model writes. The cheapest figure is not automatically the right choice, because a cost per document only counts for a model whose output passes your quality test.

How to measure cost per document

  1. Pull a sample of real documents from the last month of traffic. Include the longest and messiest, since they tend to drive spend.
  2. Count input tokens for each document, including your prompt, your instructions and any examples.
  3. Count output tokens, including structured output and any reasoning tokens the model produces.
  4. Add retries and fallback calls. A failed call that runs again is a second charge for the same document.
  5. Price the tokens at each vendor’s current list rate. Check the pricing page on the day you run the numbers, since rates change.
  6. Divide the total by the number of documents in the sample.

Use the LLM cost calculator to plug in your counts once you have them. Then score quality on the same documents. A low cost per document means nothing if the model misses clauses, so score each candidate first and compare cost only among those that pass your test. The LLM evaluation guide covers how to build that test from your own data.

Mistakes that skew the number

  • Averaging only. A mean hides the long tail. Check the 90th percentile of cost per document as well, since a small share of long files can drive much of the bill.
  • Counting only input tokens. When a model writes explanations or reasoning, output can be the larger share of the bill.
  • Forgetting the prompt. Your instructions and examples are sent with every document, so a long prompt is paid for across the whole batch.
  • Paying the real-time rate for everything. Some work can wait. Anthropic’s Batch API is half price, so the per-document cost falls on that path. The batch API vs real-time guide covers when the wait is worth it.
  • Ignoring queue time. A slower model can keep a backlog open for longer, even when its cost per document is low. Measure how long a full batch takes, not only what it costs.

Start with your own numbers

Your document count and tokens per document are probably already in your logs. If they are not, start there, then price a sample with the steps above. The cost per million tokens guide explains the rate side in more detail, and the AI unit economics guide shows how to turn the per-document figure into a cost per case or per customer. You can also start at the Own Weights home page.

If you want the AI calls in your code mapped first, the free AI cost audit reads that code as text on your own machine, uploads nothing, and saves a PDF listing each call, its model and its estimated cost. Use the “Book a free audit” button on this page to walk through those numbers with us on a call.

Questions

How do you calculate LLM cost per document?

Multiply the input and output tokens for one document by the model's current per-token prices, then add the cost of any retries. Average that figure over a sample of real documents, not one example. The result is the number to put in your budget.

Is cost per document more useful than cost per token?

For budgeting, yes, because document volume is what you pay against. A token price on its own says nothing about how long each document is. Pair it with a sample of your own files before you compare vendors.

Is the batch discount worth it for document processing?

It is worth it when results can wait for a later run, since Anthropic's Batch API is half price. Documents that someone reads in real time usually need the regular API. Many pipelines have a mix of both.