The list price per million input tokens is rarely what a production workload pays. Two mechanisms change it the most: prompt caching, which bills repeated input at a fraction of the normal rate, and batch processing, which discounts work you can wait for. Every provider we track handles them differently. This page sets out the rules from each provider’s own documentation and prices two workloads with them.
What caching and batching actually discount
Prompt caching applies to the start of a prompt that repeats exactly: a system prompt, tool definitions, a long document, or the earlier turns of a conversation. The provider keeps the processed prefix for a while; when the next request begins with the same tokens, those tokens are billed at the cached (or “cache hit”) rate. Change one token early in the prompt and everything after it is a miss.
Batch processing means submitting many requests as a job and accepting results later (OpenAI, Anthropic and Google describe a window of up to 24 hours). In return, the provider discounts every token in the job. It suits evaluations, classification backfills, nightly summaries and embeddings-style bulk work; it does not suit a user waiting for a reply.
Provider by provider
Anthropic (Claude)
- You mark what to cache with
cache_controlbreakpoints, or turn on automatic caching. Minimum cacheable prompt: 512 tokens on the current models (Fable 5.1, Opus 5.5, Sonnet 5.5, Haiku 5.5). - Cache writes cost 1.25× the input price for the default 5-minute lifetime, or 2× for a 1-hour lifetime. Each cache hit refreshes the 5-minute timer at no charge.
- Cache reads cost 0.1× input as the standard multiplier, 0.05× on Opus 5.5 and Sonnet 5.5, and 0.025× on Fable 5.1.
- Message Batches: 50% off all usage. The discount stacks with caching, but cache hits inside a batch are best-effort (Anthropic cites 30–98% hit rates); its docs suggest the 1-hour cache for batches with shared context.
OpenAI
- For GPT-5.6 and later, cache writes cost 1.25× the input rate for the default 30-minute lifetime, or 2.5× for a 12-hour lifetime (Responses API). Reads cost 0.1× on most of these models and 0.05× on GPT-6.1 Sol.
- OpenAI stresses that the write rate is not an extra fee on top: each input token is billed once, at the uncached, cached or cache-write rate.
- Minimum cacheable prefix: 1,024 tokens for GPT-5.6 and later. Reported cached tokens are rounded down to a multiple of 128.
- Batch API: 50% off, results within 24 hours. The batch price table also halves cached-input and cache-write rates.
Google (Gemini)
- Implicit caching is on by default for Gemini 2.5 and newer: no setup, savings applied automatically on a hit. Minimum input for a hit: 4,096 tokens on Gemini 4 Argon, 3.8 Flash, 3.6 Flash and 3.1 Pro.
- Gemini 4 Argon supports implicit caching only. Other models also offer explicit caches, which add a storage charge per million tokens per hour (for example $0.50 on 3.8 Flash through 2026, $1.00 on the Flash-Lite models, $4.50 on 3.1 Pro).
- On Gemini 4 agent loops, Google notes that a new turn adding fewer than 2,050 tokens re-processes the last 2,050 tokens of the previous request at the standard input rate.
- Batch API: 50% of the standard price, 24-hour target turnaround; cache hits inside a batch are billed at the normal caching rates.
xAI (Grok)
- Caching is automatic for messages at the start of the conversation that match the previous request exactly. xAI recommends sending an
x-grok-conv-idheader to raise the hit rate. - No separate write charge appears on the pricing page; cached tokens have their own listed rate.
- Batch API discount varies by model: 20% on Grok 4.7 (and other listed Grok 4.x models), applied to input, output, cached and reasoning tokens. Grok Build 0.1 is not on the discount list. Priority processing costs 2× standard rates.
DeepSeek
- Context caching on disk is enabled for everyone by default; a request hits the cache when its prefix fully matches a stored “cache prefix unit”. DeepSeek calls it best-effort, with no guaranteed hit rate.
- Cache hits are priced far below misses (see the table below). There is no separate write fee on the pricing page.
- DeepSeek’s pricing page lists no batch discount. Its equivalent lever is time of day: off-peak hours cost half the peak rate (peak is 01:00–04:00 and 06:00–10:00 UTC on weekdays).
Every model’s cache and batch rates
| Model | Input $/M | Cache read $/M | Read saving | Cache write $/M | Batch discount |
|---|---|---|---|---|---|
| Anthropic Fable 5.1 | $10 | $0.25 | 98% | $12.5 | 50% |
| Anthropic Opus 5.5 | $4 | $0.2 | 95% | $5 | 50% |
| Anthropic Sonnet 5.5 | $2 | $0.1 | 95% | $2.5 | 50% |
| Anthropic Haiku 5.5 | $0.1 | $0.01 | 90% | $0.125 | 50% |
| OpenAI GPT-6 Astra | $10 | $1 | 90% | $12.5 | 50% |
| OpenAI GPT-6.1 Sol | $2 | $0.1 | 95% | $2.5 | 50% |
| OpenAI GPT-6 Luna | $0.1 | $0.01 | 90% | $0.125 | 50% |
| OpenAI GPT-5.6 Sol | $4 | $0.4 | 90% | $5 | 50% |
| OpenAI GPT-5.5 Pro | $30 | — | — | — | 50% |
| OpenAI GPT-5 nano | $0.05 | $0.005 | 90% | — | 50% |
| Google Gemini 4 Argon | $2 | $0.1 | 95% | — | 50% |
| Google Gemini 3.8 Flash | $0.75 | $0.075 | 90% | — | 50% |
| Google Gemini 3.1 Pro | $2 | $0.2 | 90% | — | 50% |
| Google Gemini 3.5 Flash-Lite | $0.3 | $0.03 | 90% | — | 50% |
| Google Gemini 3.1 Flash-Lite | $0.25 | $0.025 | 90% | — | 50% |
| xAI Grok 4.7 | $2 | $0.5 | 75% | — | 20% |
| xAI Grok Build 0.1 | $1 | $0.2 | 80% | — | none |
| DeepSeek V4 Pro | $1.32 | $0.044 | 97% | — | — |
| DeepSeek V4.1 Flash | $0.3 | $0.006 | 98% | — | — |
“Cache write” is shown only where the provider charges a separate write rate (Anthropic’s 5-minute lifetime, OpenAI’s 30-minute default). DeepSeek rates are peak-hour; Gemini 4 Argon and 3.8 Flash have announced price increases (see the Gemini page).
When a cache write pays for itself
With a 1.25× write and a 0.1× read, writing a prefix once and reading it once costs 1.35× its normal input price, against 2× for sending it twice uncached; OpenAI’s documentation works through the same numbers. Over ten uses the cached version costs 2.15× instead of 10×. So caching pays from the second hit, as long as the hits arrive before the entry expires: within 5 minutes on Anthropic’s default, 30 minutes on OpenAI’s. Low-traffic apps that send a request every 20 minutes may pay write prices again and again without ever reading, which is what the longer (and pricier) lifetimes are for.
Example A: a support assistant with a long fixed prefix
5,000 requests a day. Each sends a 6,000-token fixed prefix (instructions plus product documentation), 300 tokens of question, and gets 300 tokens back. The prefix is 95% of the input and clears every provider’s minimum length. At this traffic (several requests a minute) the cache stays warm, so we treat the prefix as read from cache and ignore the occasional write.
| Model | Per month, no caching | Per month, prefix cached | Saving |
|---|---|---|---|
| OpenAI GPT-5 nano | $65.25 | $24.75 | 62% |
| Anthropic Haiku 5.5 | $117 | $36.00 | 69% |
| OpenAI GPT-6 Luna | $117 | $36.00 | 69% |
| Google Gemini 3.1 Flash-Lite | $304 | $101 | 67% |
| DeepSeek V4.1 Flash | $338 | $72.90 | 78% |
| Google Gemini 3.5 Flash-Lite | $396 | $153 | 61% |
| Google Gemini 3.8 Flash | $878 | $270 | 69% |
| xAI Grok Build 0.1 | $1,035 | $315 | 70% |
| DeepSeek V4 Pro | $1,426 | $277 | 81% |
| xAI Grok 4.7 | $2,160 | $810 | 63% |
| Anthropic Sonnet 5.5 | $2,340 | $630 | 73% |
| OpenAI GPT-6.1 Sol | $2,340 | $630 | 73% |
| Google Gemini 4 Argon | $2,340 | $630 | 73% |
| Google Gemini 3.1 Pro | $2,430 | $810 | 67% |
| Anthropic Opus 5.5 | $4,680 | $1,260 | 73% |
| OpenAI GPT-5.6 Sol | $4,680 | $1,440 | 69% |
| Anthropic Fable 5.1 | $11,700 | $2,925 | 75% |
| OpenAI GPT-6 Astra | $11,700 | $3,600 | 69% |
| OpenAI GPT-5.5 Pro | $36,450 | — | — |
On Sonnet 5.5, for example, the bill falls from $2,340 to $630 a month. Notice that the saving is never the full read discount: output tokens and the uncached question are billed at the normal rates, and output is the expensive part (see input vs output pricing).
Example B: an offline classification job through the Batch API
200,000 support tickets a month, labelled overnight. Each request is 800 input tokens and 50 output tokens, and nobody is waiting for the answer, so it can go through a batch job.
| Model | Standard API / month | Batch API / month |
|---|---|---|
| OpenAI GPT-5 nano | $12.00 | $6.00 |
| Anthropic Haiku 5.5 | $21.00 | $10.50 |
| OpenAI GPT-6 Luna | $21.00 | $10.50 |
| Google Gemini 3.1 Flash-Lite | $55.00 | $27.50 |
| DeepSeek V4.1 Flash | $60.00 | — |
| Google Gemini 3.5 Flash-Lite | $73.00 | $36.50 |
| Google Gemini 3.8 Flash | $158 | $78.75 |
| xAI Grok Build 0.1 | $180 | — |
| DeepSeek V4 Pro | $251 | — |
| xAI Grok 4.7 | $380 | $304 |
| Anthropic Sonnet 5.5 | $420 | $210 |
| OpenAI GPT-6.1 Sol | $420 | $210 |
| Google Gemini 4 Argon | $420 | $210 |
| Google Gemini 3.1 Pro | $440 | $220 |
| Anthropic Opus 5.5 | $840 | $420 |
| OpenAI GPT-5.6 Sol | $840 | $420 |
| Anthropic Fable 5.1 | $2,100 | $1,050 |
| OpenAI GPT-6 Astra | $2,100 | $1,050 |
| OpenAI GPT-5.5 Pro | $6,600 | $3,300 |
A dash means the provider publishes no batch discount for that model. For DeepSeek, running the same job outside peak hours halves it instead. Batch and caching can be combined on Anthropic, OpenAI and Google, but a shared prefix of 800 tokens is too short to cache on Gemini (4,096-token minimum) and on OpenAI (1,024), which is why this example uses batch alone.
Common mistakes
- Putting variable content first. A timestamp, user name or retrieved snippet at the top of the prompt breaks the prefix for everything after it. Put the stable parts first and the changing parts last.
- Prefixes under the minimum. A 900-token system prompt is not cached on OpenAI or Gemini, and no error tells you so. Check the cached-token field in the response usage.
- Assuming batch is free money. A 24-hour window is fine for backfills and bad for anything user-facing; and on xAI the discount is 20%, not 50%.
- Forgetting storage on explicit Gemini caches. Explicit caches bill per hour they exist, used or not.
To try your own cache hit rate, set the cached share in the calculator.
Sources
- Claude Docs: Prompt caching
- Claude Docs: Batch processing
- Claude pricing
- OpenAI API Docs: Prompt caching
- OpenAI API Docs: Batch API
- OpenAI API pricing
- Google AI for Developers: Context caching
- Google AI for Developers: Batch API
- Google AI for Developers: Gemini API pricing
- xAI Docs: Prompt caching
- xAI Docs: Pricing (batch and priority)
- DeepSeek API Docs: Context caching
- DeepSeek API Docs: Models & Pricing