LLM API pricing compared: what the per-million-token price leaves out

Claude Sonnet 5.5 lists input at $2 per 1M tokens, but a cache hit on that same input costs $0.10 and a 1-hour cache write costs $4 (Anthropic pricing page, checked November 2026). The sticker price is not your bill: what you pay depends on four things the per-million price leaves out, namely cached input, batch discounts, thinking tokens billed as output, and long-context tiers.

Why does my LLM bill spike even when I use the same prompts?

Because the same prompt is billed at different rates depending on the cache. On Anthropic, a 5-minute cache write costs 1.25x the base input rate, a 1-hour write costs 2x, and a cache read costs 0.1x on most models (0.05x on Claude Opus 5.5 and Sonnet 5.5). A 5-minute write pays off after one read; a 1-hour write pays off after two (Anthropic pricing page, checked November 2026).

So the same prompt costs you more than base input on a cold write and a small fraction of it on a hit. If your cache keeps expiring or your prefix keeps changing, you pay the write premium again and again.

OpenAI and Google price cached input too. OpenAI’s gpt-6.1-sol charges $2.00 per 1M input tokens and $0.10 per 1M cached input tokens (OpenAI pricing page, checked November 2026). Google’s Gemini 3.1 Pro Preview adds cache storage at $4.50 / 1,000,000 tokens per hour on top of the cached rate (Google AI Studio pricing page, checked November 2026).

How do I find cached input usage in my bill?

Use the usage fields in each API response, not your prompt length. Anthropic’s usage object returns input_tokens (uncached input only), cache_creation_input_tokens, cache_read_input_tokens and output_tokens. OpenAI returns prompt_tokens with prompt_tokens_details.cached_tokens on Chat Completions, and input_tokens with input_tokens_details.cached_tokens on the Responses API. The Gemini API returns usageMetadata with promptTokenCount and cachedContentTokenCount.

Your cached-input share is cached tokens divided by total input tokens. On Anthropic, total input is input_tokens plus both cache fields; OpenAI and Gemini prompt counts already include cached tokens. If your system prompt is identical on every call and that share is near zero, you are paying full input price for a prefix you could cache. If you log raw Anthropic responses as JSON lines, this gives you the split:

jq -s '{
  uncached_input: (map(.usage.input_tokens) | add),
  cache_write:    (map(.usage.cache_creation_input_tokens // 0) | add),
  cache_read:     (map(.usage.cache_read_input_tokens // 0) | add),
  output:         (map(.usage.output_tokens) | add)
}' anthropic-responses.jsonl

Check your own bill in 2 minutes: https://revelations.consulting/checker?utm_source=blog&utm_medium=organic&utm_content=blog-llm-api-pricing-beyond-per-million-token-price

How do I fix it without breaking latency or reliability?

Cache what repeats, and put it first. Prompt caching matches on an exact prefix, so keep the system prompt, tool definitions and long reference documents at the start, and put anything that changes per request after them. On Anthropic a cache write costs more than plain input (1.25x or 2x), so caching a prompt that is never read again raises your bill. Prefer the 5-minute cache unless reuse is spaced further apart, since a 1-hour write needs two reads to pay off.

Move work that can wait to the batch API. Anthropic’s Batch API gives “a 50 percent discount on both input and output tokens”, and it stacks with the cache multipliers (Anthropic pricing page, checked November 2026). OpenAI lists gpt-6-sol batch at $1.00 input, $0.10 cached and $5.00 output, against $2.00, $0.20 and $10.00 standard (OpenAI pricing page, checked November 2026).

Google lists Gemini 4 Carbon batch at $1.00 / $5.00 through November 30, 2026, then $2.00 / $10.00 (Google AI Studio pricing page, checked November 2026). Mistral says Batch is 50% off but lists no per-model batch price (Mistral pricing page, checked November 2026), so confirm the rate on your invoice after a small test run.

The risk: batch is asynchronous. Results come back later, not in the request, so only move jobs that tolerate delayed results, such as evals, backfills, document summarization and nightly reports. Keep chat, agents in a user’s loop and anything with a timeout on the synchronous API.

Why is my output cost higher than the response length suggests?

Because on Google, hidden thinking is billed. Google labels every output price “Output price (including thinking tokens)” (Google AI Studio pricing page, checked November 2026). For Gemini 4 Carbon the page adds: “Every token the model processes is counted and billed, including thinking tokens and internal tool system instructions and function declarations when using grounding.”

OpenAI’s and Anthropic’s pricing pages don’t state how reasoning tokens are billed, so measure rather than assume.

Compare billed output tokens with the visible response in your own logs. On Gemini, usageMetadata reports candidatesTokenCount and thoughtsTokenCount separately. On OpenAI and Anthropic, compare completion_tokens or output_tokens with the length of the text you actually return. A large, steady gap is a line item to price.

Why do long prompts cost more per token?

Because some models charge a higher rate once a prompt crosses a length threshold. Gemini 3.1 Pro Preview charges $2.00 per 1M input tokens for prompts <= 200k tokens and $4.00 above 200k, and output goes from $12.00 to $18.00 (Google AI Studio pricing page, checked November 2026). Claude Haiku 5.5 charges $0.10 per 1M input tokens for prompts up to 100,000 tokens and $0.50 over 100,000.

The Haiku 5.5 threshold counts all input tokens “including cache reads and cache writes” (Anthropic pricing page, checked November 2026). A large cached prefix plus a long question can push the request into the higher tier, even though most of it is billed at the cache rate.

Claude 4.6 and later models other than Haiku 5.5 don’t tier: they get the full 1M token context at standard pricing. But Claude 4.7 and later use a tokenizer that “produces approximately 30% more tokens for the same text”, so the same documents cost more tokens after an upgrade. Re-measure token counts when you switch models.

OpenAI’s pricing page switches between Short (272K input tokens or fewer) and Long (over 272K) prices. Check the Long rate on that page before you send prompts over 272K.

Prices also change on fixed dates (Google AI Studio pricing page, checked November 2026):

ModelThroughInput / cached / outputFromInput / cached / output
Gemini 4 CarbonNovember 30, 2026$2.00 / $0.10 / $10.00December 1, 2026$4.00 / $0.20 / $20.00
Gemini 3.8 FlashDecember 31, 2026$0.75 / $0.075 / $3.75January 1, 2027$1.50 / $0.15 / $7.50

Gemini 2.5 Pro charges $1.25 per 1M input tokens up to 200k and $2.50 above, but from December 1, 2026 its requests route to Gemini 3.8 Flash at that model’s rates. If you still call Gemini 2.5 Pro, budget at Gemini 3.8 Flash prices from that date.

What it usually looks like

Teams see three patterns:

  1. The same system prompt goes out on every call, but the cache-read share in the usage fields is near zero, so the whole prefix bills at full input price.
  2. A significant share of calls are batchable, repetitive data prep, report generation, document summarization, but they’re sent one at a time.
  3. On Gemini, billed output tokens run well above the visible response because thinking tokens are billed at the output rate, and nobody priced them.

This week, pull last week’s token usage by model, split it into uncached input, cached input, output and batch, and price each bucket at the listed rates rather than the headline input price.

If you want a second pair of eyes on the numbers, book a free 30-minute consult: https://revelations.consulting/?utm_source=blog&utm_medium=organic&utm_content=blog-llm-api-pricing-beyond-per-million-token-price#contact. We’ll look at your bill with you, no obligation and no sales pitch.

Run your own numbers: LLM API price table

Frequently asked questions

Does Google bill Gemini thinking tokens as output?

Yes. Google’s Gemini API pricing page labels every output price “Output price (including thinking tokens)” (checked November 2026), so Gemini thinking tokens are billed at the output rate even though they don’t appear in the response text.

Is batch discounting available on all LLM providers?

OpenAI, Anthropic and Google list batch prices on their pricing pages, and Anthropic’s Batch API gives “a 50 percent discount on both input and output tokens” (checked November 2026). Mistral says Batch is 50% off but lists no per-model batch price. Batch requests are asynchronous, so use them only for jobs that tolerate delayed results.

Do I pay for cache storage?

Yes, on Google. Gemini 3.1 Pro Preview charges cache storage at $4.50 / 1,000,000 tokens per hour (Google AI Studio pricing page, checked November 2026), on top of the cached input rate. Anthropic’s pricing page prices caching through write multipliers instead: 1.25x base input for a 5-minute write and 2x for a 1-hour write.

How do I know if my prompt is hitting the long-context tier?

Check the input token count per request in your API logs against each threshold: over 200k tokens for Gemini 3.1 Pro Preview, over 100,000 for Claude Haiku 5.5 (counting cache reads and cache writes), and over 272K for OpenAI’s Long prices. Claude 4.6 and later models other than Haiku 5.5 bill the full 1M token context at standard pricing.

Can I use Anthropic prompt caching with the Batch API?

Yes. Anthropic’s Batch API discount stacks with the cache multipliers, so a 1-hour cache write inside a batch is billed at 2x base input with the 50 percent discount applied (Anthropic pricing page, checked November 2026).

Run the numbers on your own bill: What does one AI conversation cost? · LLM API pricing, per million tokens. Free, in your browser.

Want this kind of thing weekly? Get Cloud Bill Weekly. Want us to find it in your bill? We're taking three founding clients for a free Cost Assessment.