AI API Cost Management
What a 70% vs 90% Prompt Cache Hit Rate Does to an AI Agent's Bill, Across 72 Models
I priced the same agent task on every model in our prompt caching table at four cache hit rates. The hit rate moves the bill about as much as picking a cheaper model, and on Claude and newer GPT models a low hit rate makes caching cost more than not caching.
I priced one agent task, 20 calls of 40,000 input and 1,000 output tokens, on 72 LLM APIs at November 9, 2026 prices. The median task costs $1.05 with no prompt caching, $0.63 at a 50% cache hit rate, $0.46 at 70% and $0.29 at 90%. Going from 70% to 90% cuts the median by 38%. On 22 Claude and GPT models, cache writes cost 25% more than input, so caching loses money below about a 21% hit rate.
7 min read - Published Nov 9, 2026 - Updated Nov 9, 2026
One agent task, priced 72 ways
An agent sends the same long prefix again and again: system prompt, tool definitions, the files it has read, the conversation so far. Most of that is already in the provider's prompt cache from the previous step. How much of it is, the cache hit rate, decides most of the bill.
So I fixed one task and priced it on all 72 current models in our prompt caching table, from 13 providers. The task is 20 calls, each sending 40,000 input tokens and getting 1,000 tokens back. Then I changed only the hit rate: none, 50%, 70% and 90%.
At 90% the median task costs about 30% of the uncached price. Most providers price a cache read at 90% off input. The full range is 75% to 98% off, and that spread is where the rankings below start to move.
Going from 70% to 90% is worth more than it sounds
Twenty points of hit rate doesn't sound like much. It cuts the median task cost by 38%, because at 70% the 30% of input you miss is billed at full price, and at 90% only 10% is.
To get a sense of scale, I paired each model with the next cheaper model from the same provider, both at a 70% hit rate, and compared that saving with keeping the model and reaching 90%. In 35 of 59 pairs, the better hit rate saved more. That isn't a quality comparison. The cheaper model may not do the job, and the hit rate may not be yours to raise. But it does mean the cache is worth checking before you start a model migration.
Same list price, different bill
Claude Sonnet 5.5, GPT-6.1 Sol and Gemini 4 Argon all list $2 per million input tokens, $10 output and $0.10 for a cache read. With no cache, 100 of these tasks cost $180.00 on each. Turn caching on and they split.
| Model | Cache write per 1M | 100 tasks, 50% hit | 100 tasks, 90% hit |
|---|---|---|---|
| Claude Sonnet 5.5 | $2.50 | $124.00 | $47.20 |
| GPT-6.1 Sol | $2.50 | $124.00 | $47.20 |
| Gemini 4 Argon | No write charge listed | $104.00 | $43.20 |
Every token that misses the cache on Sonnet or GPT-6.1 Sol gets written to it at $2.50 instead of $2, so the bill is 19% higher than Argon's at a 50% hit rate. At 90% fewer tokens miss and the gap shrinks to 9%. Gemini has its own extra cost if you create caches explicitly, an hourly storage fee, which isn't in these numbers.
Below about 21%, caching costs you money
22 models in this set charge 25% more than the input price to write the cache: Claude models and OpenAI's GPT-5.6 and GPT-6 families. Each miss costs a little extra and each hit saves a lot, so there's a break-even hit rate. For these models it falls between 20% and 22%.
break-even hit rate = (write - input) / (write - cached read)
Claude Sonnet 5.5: (2.50 - 2.00) / (2.50 - 0.10) = 20.8%An agent that rereads the same context every step will clear that easily. A workload where every request has a different prefix, like one-off document summaries, may not. The models without a write charge, including Gemini, DeepSeek, Grok and Mistral, and Kimi, which lists writes at the input price, have no break-even: a cache hit can only lower the bill.
The cheapest model at 0% isn't the cheapest at 90%
Here are 12 models people often compare, priced per 100 tasks. Watch DeepSeek V4 Pro and Grok 4.3. With no cache Grok is cheaper. At 90% DeepSeek costs about a quarter less, because it takes 96.7% off a cache read and Grok takes 84% off.
| Model | No cache | 50% hit | 70% hit | 90% hit |
|---|---|---|---|---|
| Claude Opus 5.5 | $360.00 | $248.00 | $171.20 | $94.40 |
| Claude Sonnet 5.5 | $180.00 | $124.00 | $85.60 | $47.20 |
| Gemini 4 Argon | $180.00 | $104.00 | $73.60 | $43.20 |
| Kimi K3.1 Pro | $180.00 | $108.00 | $79.20 | $50.40 |
| DeepSeek V4 Pro | $113.52 | $62.48 | $42.06 | $21.65 |
| Grok 4.3 | $105.00 | $63.00 | $46.20 | $29.40 |
| GPT-6.1 Terra | $90.00 | $62.00 | $42.80 | $23.60 |
| Gemini 3.8 Flash | $67.50 | $40.50 | $29.70 | $18.90 |
| Mistral Large 4 | $60.20 | $35.00 | $24.92 | $14.84 |
| Qwen3.7 Plus | $35.20 | $22.40 | $17.28 | $12.16 |
| Claude Haiku 5.5 | $9.00 | $6.40 | $4.56 | $2.72 |
| GPT-6 Luna | $9.00 | $6.40 | $4.56 | $2.72 |
Kimi K3.1 Pro goes the other way. It beats Sonnet 5.5 at 50% and 70%, then costs more at 90%, because its cache read is 90% off and Sonnet's is 95% off. The full list of cached prices and discounts is on the prompt caching price table.
Raising the hit rate without changing models
- Put what never changes first. Tool definitions, the system prompt and reference documents go at the top, and each step appends to the end. The cache matches from the start of the prompt, so one changed character early on misses everything after it.
- Keep timestamps, request IDs and per-user details out of the system prompt. They make every prefix unique.
- Don't reorder or rebuild the tool list between steps. Same tools, same order.
- On Claude, mark the cache breakpoints yourself, and check the cache lifetime. The default cache lasts 5 minutes. If your steps are slower than that, the 1-hour cache costs more to write but stops you rewriting the prefix every step.
- Measure before you tune. Log cached and total input tokens per call and watch the ratio after each prompt change.
If a cheaper model also needs more steps, the per-step savings can disappear. I worked through that case in why a cheaper model can make an agent cost more per task.
How I measured this, and what could be wrong
- Prices are list prices from our dataset on November 9, 2026, each checked against the provider's official pricing page. The set is every current model on our prompt caching table that lists a cached-input price, minus deprecated models: 72 models from 13 providers.
- The task shape is my choice, not a measurement of real agents: 20 calls, 40,000 input and 1,000 output tokens each. 40,000 is below every long-context price tier, so the standard rate applies everywhere.
- Tokens that miss the cache are billed at the listed cache-write price when there is one, on the assumption they get written for the next call. Otherwise they're billed as normal input.
- Not included: Gemini's explicit cache storage fee, Batch prices, DeepSeek's off-peak rates (the table uses the standard rate), cache expiry between calls, and any minimum prompt size a provider needs before it caches.
- The same-provider pairs compare price only. Model quality is not part of this.
FAQ
What is a good prompt cache hit rate for an AI agent?
There's no standard number, and I didn't measure real agents here. What the prices say: at 50% the median task costs 63% of the uncached price, at 70% about 47%, at 90% about 30%. Measure your own rate from the usage fields before you plan around any of these.
Can prompt caching cost more than not caching?
Yes, on models that charge extra to write the cache. 22 models in this set, all Claude or OpenAI GPT-5.6 and GPT-6 models, list writes at 1.25 times the input price. If fewer than about 21% of input tokens come back as cache reads, you pay more than you would with caching off.
How do I measure my cache hit rate?
Divide cached input tokens by total input tokens from the usage block of each response. OpenAI reports cached_tokens under the input or prompt token details. Anthropic reports cache_read_input_tokens and cache_creation_input_tokens next to input_tokens, so add all three for the total. Gemini reports cachedContentTokenCount.
Why does Claude Sonnet 5.5 cost more than Gemini 4 Argon when the prices match?
Both list $2 input, $10 output and $0.10 cached input per million tokens. Sonnet 5.5 also charges $2.50 to write the cache and our data shows no write charge for Argon, so at a 50% hit rate 100 tasks cost $124.00 on Sonnet and $104.00 on Argon. Gemini's explicit cache storage fee isn't counted here.
Does this include Batch discounts?
No. Every number uses standard pay-as-you-go prices. Some providers let Batch and caching stack and some don't, so it needs its own comparison.
Put your own hit rate in and see the bill.
The prompt caching savings calculator takes your prompt size, calls and hit rate and prices them on current rates, cache writes included. Free, no account.