Claude API Cost: 40 Invoices, 3 Models, a 33x Price Gap
One real job on Claude Haiku 5.5, Sonnet 5.5 and Opus 5.5: 40 invoices, 7 fields each. All scored 40 of 40, and the bill ran from $0.0158 to $0.5238 per 100 invoices. Thinking tokens were over half the output.
By Duy Lam Le, written with AI7 min read
Why trust this: every result, number and screenshot comes from a real run on our own accounts, not from the AI. How we test

Measured 19 Nov 2026. This is "The AI Bill" #1: one real job, run on our own Claude API key, with the token counts the API returned and the dollars they work out to at the list price.
The job: pull 7 fields (vendor, invoice number, date, currency, number of line items, tax, total) out of 40 English invoices. We ran it on Claude Haiku 5.5, Sonnet 5.5 and Opus 5.5. All three got all 40 invoices fully right. The bill per 100 invoices was $0.0158 on Haiku, $0.2511 on Sonnet and $0.5238 on Opus, a 33x gap for the same score.
The second finding is in the token counts. Claude spends "thinking" tokens before it answers, and they are billed as output. On Haiku 66% of the output tokens were thinking, on Sonnet 53%, on Opus 55%.
At a glance
Key results
- Same accuracy, 33x the price. 40 of 40 invoices fully correct (all 7 fields) on Haiku 5.5, Sonnet 5.5 and Opus 5.5. Cost per 100 invoices: $0.0158, $0.2511 and $0.5238.
- Thinking is more than half the output. 6,364 of 9,710 output tokens on Haiku, 3,766 of 7,089 on Sonnet, 4,155 of 7,521 on Opus were thinking tokens.
- Turning thinking off cut the bill by 51% on Haiku and 35% on Sonnet, with the score still 40 of 40. Opus 5.5 refused the setting (HTTP 400).
- Output is the expensive side. Output tokens were 77% of the Haiku bill, 71% of Sonnet's and 72% of Opus's, although the invoice itself (about 369 tokens) is longer than the JSON answer.
- A cap can fake a failure. Our first run capped the answer at 300 tokens. Haiku "failed" 6 of 40 invoices, all cut off mid-thinking. With a cap of 2,000 tokens it got 40 of 40.
- What this run cost us: about $1.04 across 4 runs, including the throwaway run with the 300-token cap.
Hands-on test
Setup
- Date: 19 Nov 2026, a PC in Vietnam (WSL, Python + httpx), direct calls to
POST /v1/messageswith our own Claude API key. - Data: 40 invoices we generated with a fixed random seed (2240): 11 vendors, 4 date formats, USD / EUR / GBP, 2 to 6 line items, optional discount, tax and shipping. Each is about 369 tokens of plain English text. The generator also writes the correct answers, so nothing is graded by hand. These are synthetic, clean text invoices, not scans.
- Prompt: one instruction asking for a single JSON object with the 7 fields, followed by the invoice. No examples, no system prompt.
- Grading: a field counts only on an exact match (money within half a cent, text compared case-insensitively). An invoice counts as correct when all 7 fields match.
- Models:
claude-haiku-5-5,claude-sonnet-5-5,claude-opus-5-5, default settings, then Haiku and Sonnet again with thinking turned off. - Cost:
usage.input_tokensandusage.output_tokensfrom each response, times the list price on Anthropic's pricing page. This is a calculation, not an Anthropic invoice. - Scripts and data: the measuring script, the 40 invoices with answers, the raw log and the result file are in our draft repo as
claude-api-cost-invoice-extraction.*.

Claude API pricing for the three models we ran
Prices per 1 million tokens, standard tier, read on Anthropic's pricing page on 19 Nov 2026.
Source: Anthropic pricing. Prices for Gemini and GPT models are in our AI model pricing page. Output costs 5x input on all three. For a task where the answer is short, that looks like it should not matter. It did, because of thinking tokens (below).
Claude API costs per model: 40 invoices
Input was 14,772 tokens in every default run (14,692 with thinking off). The gap between models is almost all price per token, not token count: Opus used about the same tokens as Sonnet and cost 2.1x as much. Haiku with thinking off was 67x cheaper than Opus and got the same score.
Claude API usage: where the output tokens went
The JSON answer itself is short: with thinking off, the API reported 82 output tokens per invoice on Haiku and 91 on Sonnet. With default settings it reported 243 on Haiku, 177 on Sonnet and 188 on Opus. The difference was thinking: 159, 94 and 104 tokens per invoice. Anthropic's adaptive thinking page says the tokens Claude uses while thinking are "billed as output tokens", so you pay for them even though the thinking text came back empty in our responses.
You read this directly from the response: usage.output_tokens already includes the thinking tokens, and usage.output_tokens_details.thinking_tokens tells you how many.
Turning thinking off is a setting, not a guess. Haiku 5.5 accepted {"type": "disabled"} and Sonnet 5.5 accepted {"type": "between_tools"}, which its error message named as the way to turn thinking off. Opus 5.5 returned an error for both (HTTP 400 for between_tools). If your job is extraction or classification and the score holds, test the switch before you test a cheaper model.

Claude API cost per token, worked out
The list prices are per million tokens, so one token costs a very small number. For our invoices:
- Haiku 5.5: $0.0000001 per input token, $0.0000005 per output token.
- Sonnet 5.5: $0.000002 per input token, $0.00001 per output token.
- Opus 5.5: $0.000004 per input token, $0.00002 per output token.
One invoice (about 369 input tokens plus the answer) cost $0.000158 on Haiku, $0.0025 on Sonnet and $0.0052 on Opus. Those numbers are why "which model" matters more than "how many invoices" until you are well into the thousands.
What Claude API costs look like at 100,000 invoices
This is a straight multiplication of our per-100 numbers, so treat it as an estimate that holds only for invoices about as long and as clean as ours.
Claude API cost calculator for your own job
You do not need a calculator page. Run 20 to 40 real examples, add up the two numbers the API returns, and multiply:
PRICE = { # USD per 1M tokens: (input, output)
"claude-haiku-5-5": (0.10, 0.50),
"claude-sonnet-5-5": (2.00, 10.00),
"claude-opus-5-5": (4.00, 20.00),
}
def cost(model: str, usage: dict) -> float:
price_in, price_out = PRICE[model]
# output_tokens already includes thinking tokens
return (usage["input_tokens"] * price_in + usage["output_tokens"] * price_out) / 1_000_000
Sum cost() over your sample, divide by the number of examples, and you have the cost per item for that model, with thinking on or off, on your own data. Set max_tokens high enough (we used 2,000) or the thinking will use up the cap before the answer starts.
What worked
What worked
- Reading
usagefrom every response. It is the only number that matches what you are billed for. - A generator that writes the answer key with the data, so accuracy is a count and not an opinion.
- Testing the thinking switch. It halved the Haiku bill without costing a single invoice.
Where it fell short
What didn't work
- The first run, with a 300-token cap. Haiku looked 85% accurate (34 of 40) and the six misses were all cut-off responses. We threw that run away and say so above.
- Turning thinking off on Opus 5.5. The API returned an error for both settings we tried.
- Using 40 clean synthetic invoices to say anything about scans, tables or handwriting. A harder set could separate the models. This one did not. If your invoices arrive as PDF files, our PDF invoices to Excel test with Claude Code covers that workflow.
Our verdict
For clean, text-based extraction like this, start with Claude Haiku 5.5 and turn thinking off. In our run it matched Opus 5.5 at 40 of 40 for $0.0078 per 100 invoices instead of $0.5238. Move up to Sonnet 5.5 or Opus 5.5 only when a test on your own hard examples shows Haiku missing fields. Our Claude Haiku vs Sonnet test reached the same result on three office tasks: 15/15 for both, with Haiku 18 times cheaper. Whatever you pick, log usage on every call from day one, because thinking tokens decide the bill.
FAQ
How much does the Claude API cost for a real task?
For our 40-invoice extraction, $0.0063 on Haiku 5.5, $0.1004 on Sonnet 5.5 and $0.2095 on Opus 5.5, at the list prices on 19 Nov 2026.
Do thinking tokens cost money?
Yes. Anthropic bills them as output tokens. In our run they were 53% to 66% of all output tokens.
Can I turn thinking off to save money?
On Haiku 5.5 and Sonnet 5.5, yes, and our bill fell by 51% and 35% with the score unchanged. Opus 5.5 returned an error for the settings we tried.
How this page was made: an AI assistant (Claude) helped write the text and the test script. The invoices, token counts and dollar figures come from our own API calls on 19 Nov 2026, and the prices were copied from Anthropic's pricing page that day. The RanThis editor checked each number against the source before publishing.





