What a 70% vs 90% prompt cache hit rate does to an AI agentβs bill (72 models priced)
An agent sends the same long prefix on every step: system prompt, tool definitions, the files it has read, the conversation so far. Most of it is already in the provider's prompt cache from the step before.
How much of it is, the cache hit rate, ends up deciding most of the bill. I wanted a number for that, so I fixed one task and priced it on every current model that publishes a cached-input price: 72 models from 13 providers, list prices as of November 9, 2026.
The task: 20 calls, each sending 40,000 input tokens and getting 1,000 back. Only the hit rate changes.
| Hit rate | Median cost per task |
|---|---|
| No cache | $1.05 |
| 50% | $0.63 |
| 70% | $0.46 |
| 90% | $0.29 |
70% to 90% is worth more than it sounds
Twenty points of hit rate cuts the median task cost by 38%. At 70% the 30% of input you miss is billed at full price; at 90% only 10% is.
For scale, I paired each model with the next cheaper model from the same provider, both at 70%, and compared that saving with keeping the model and reaching 90%. In 35 of 59 pairs the better hit rate saved more.
That's price only, not quality. But it's worth checking your cache 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 input, $10 output and $0.10 cached input per million tokens. With no cache, 100 tasks cost $180.00 on each.
| 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 | none listed | $104.00 | $43.20 |
Every miss on Sonnet or Sol gets written to the cache at $2.50 instead of $2. That's 19% more than Argon at a 50% hit rate and 9% more at 90%. (Gemini charges an hourly storage fee if you create caches explicitly; that isn't counted here.)
Below about 21%, caching costs you money
22 models in the set charge 25% more than input to write the cache: Claude, and OpenAI's GPT-5.6 and GPT-6 families. So there's a break-even:
break-even hit rate = (write - input) / (write - cached read)
Claude Sonnet 5.5: (2.50 - 2.00) / (2.50 - 0.10) = 20.8%
For these 22 it lands between 20% and 22%. An agent rereading the same context clears that easily. A workload where every request has a different prefix may not.
The cheapest model with no cache isn't the cheapest at 90%
With no cache, Grok 4.3 ($105.00 per 100 tasks) is cheaper than DeepSeek V4 Pro ($113.52). At 90%, DeepSeek costs $21.65 and Grok $29.40, about a quarter less, because DeepSeek takes 96.7% off a cache read and Grok takes 84% off.
How to raise and measure it
- Put what never changes first: tools, system prompt, reference docs. Append each step at the end. The cache matches from the start of the prompt.
- Keep timestamps, request IDs and per-user details out of the system prompt.
- Don't reorder the tool list between steps.
- On Claude, check the cache lifetime. The default is 5 minutes; if your steps are slower, the 1-hour cache costs more to write but stops you rewriting the prefix every step.
- Measure it: cached input tokens divided by total input tokens. OpenAI reports
cached_tokensin the token details, Anthropic reportscache_read_input_tokensandcache_creation_input_tokensnext toinput_tokens, Gemini reportscachedContentTokenCount.
Limits
List prices only. The task shape and hit rates are my scenarios, not measurements of real agents. Not included: Gemini's cache storage fee, Batch, DeepSeek off-peak rates, cache expiry between calls, minimum cacheable prompt sizes.
The full write-up, with a 12-model table and the method, is here: https://aicostbudget.com/en/blog/agent-prompt-cache-hit-rate-cost. The prices come from an open dataset (CC BY 4.0) where every price links to the provider's own page: https://github.com/aicostbudget/ai-api-pricing-data
Comments
No comments yet. Start the discussion.