GUIDE · FORMULA · CALCULATOR
Reduce LLM inference costs with prompt caching
To reduce LLM inference costs, cache the part of the prompt you resend: it is billed at 0.1x the normal input price at Anthropic and OpenAI.[2][5] A 50-turn coding agent session pays 83.5% less for input, and on Straitly the same cache reads cost a median 40% below list.
Last updated . Every number links to its source.
How much does prompt caching save?
Agents and chatbots resend the same long prefix every turn, so most of their tokens can be cache reads billed at a fraction of the normal input price.
41-80%
Lower API costs from prompt caching, measured on 500+ agent sessions (2026 study).[11] Lumer et al., 9 Jan 2026
95%+
Share of an agent's tokens that can be cache reads (Menlo Ventures, 2026).[1] Menlo Ventures, Nov 2026, survey fielded Sep 2026
>90%
Cache-hit rate of an example multi-turn agent in OpenAI's guide (illustrative).[5] OpenAI docs, Checked 9 November 2026
13-31%
Faster time to first token, same study.[11] Lumer et al., 9 Jan 2026
One prefix, ten requests: what you pay
One write + 9 reads of a shared prefix, as a multiple of its input price.
- No cache10x
- DeepSeek, disk cache (off-peak) · DeepSeek V4.1 Flash1.18x
- Google, implicit cache · Gemini 4 Argon1.45x
- Anthropic, Opus 5.5, 5-minute · Claude Opus 5.51.7x
- OpenAI, GPT-6.1 Sol, 30-minute · GPT-6.1 Sol1.7x
- Anthropic, 5-minute cache · Claude Sonnet 52.15x
- OpenAI, 30-minute cache · GPT-6 Astra2.15x
- Anthropic, 1-hour cache · Claude Sonnet 52.9x
- OpenAI, 12-hour cache · GPT-6 Astra3.4x
[2] Anthropic docs, Checked 9 November 2026; [5] OpenAI docs, Checked 9 November 2026; [8] Google, Checked 9 November 2026; [10] DeepSeek API docs, Checked 9 November 2026
How does each provider price prompt caching?
The first request pays a write to store the prefix; later requests pay a fraction to read it. Output is never discounted.
| PROVIDER | CACHE WRITE | CACHE READ | LIFETIME | MINIMUM PREFIX |
|---|---|---|---|---|
| Anthropic (Claude) | 1.25x for a 5-minute cache, 2x for a 1-hour cache | 0.1x. Opus 5.5 and Sonnet 5.5: 0.05x. Fable 5.1 and Mythos 5.1: 0.025x | 5 minutes by default, refreshed at no cost on each hit | 512 tokens on Fable 5.1, Opus 5.5, Opus 5, Sonnet 5.5 and Haiku 5.5 |
| OpenAI (GPT-5.6 and later) | 1.25x for the 30-minute default, 2.5x for 12 hours (Responses API) | 0.1x. GPT-6.1 Sol and Terra: 0.05x | 30 minutes by default, 12 hours on request | 1,024 tokens |
| Google (Gemini 4 Argon) | No write fee. Implicit caching is automatic | $0.10 against $2.00 input, which is 0.05x | Implicit, managed by Google. Explicit caching is not offered from Argon on | 4,096 tokens |
| DeepSeek (V4.1 Flash) | No write fee. A miss is billed at the normal input price | $0.003 against $0.15 off-peak, which is 0.02x | Disk cache, best effort, cleared within a few hours to a few days of last use | Not listed |
[2] Anthropic docs, Checked 9 November 2026; [5] OpenAI docs, Checked 9 November 2026; [7] Google Gemini API docs, Checked 9 November 2026; [9] DeepSeek API docs, Checked 9 November 2026
Batch discounts, rate limits and Gemini agent loops
Anthropic cache multipliers also stack with its 50% Batch discount, and cache hits do not count against Anthropic rate limits.[2]
On Gemini 4 agent loops, the previous request is cached only if the new request adds at least 2,050 tokens.[7]
Anthropic at launch: “reducing costs by up to 90% and latency by up to 85% for long prompts.”[4]
What does a cache read cost per model?
From $0.003 to $1.00 per million tokens, following each model's input price.
| MODEL | INPUT | CACHE READ | CACHE WRITE |
|---|---|---|---|
| Claude Fable 5.1 | $10.00 | $0.25 | - |
| Claude Opus 5.5 | $4.00 | $0.20 | $5.00 (5m) / $8.00 (1h) |
| Claude Sonnet 5.5 | $2.00 | $0.10 | $2.50 (5m) / $4.00 (1h) |
| Claude Sonnet 5 | $2.00 | $0.20 | $2.50 (5m) / $4.00 (1h) |
| Claude Haiku 5.5Prompts up to 100K tokens | $0.10 | $0.01 | $0.125 (5m) / $0.20 (1h) |
| GPT-6 Astra | $10.00 | $1.00 | $12.50 (30m) / $25.00 (12h) |
| GPT-6.1 Sol | $2.00 | $0.10 | $2.50 (30m) / $5.00 (12h) |
| GPT-6.1 Terra | $1.00 | $0.05 | $1.25 (30m) / $2.50 (12h) |
| GPT-6 Luna | $0.10 | $0.01 | $0.125 (30m) / $0.25 (12h) |
| Gemini 4 ArgonInput doubles on 1 Dec 2026 | $2.00 | $0.10 | Implicit, no fee |
| Gemini 3.8 FlashThrough 31 Dec 2026 | $0.75 | $0.075 | Storage $0.50 per MTok per hour |
| DeepSeek V4.1 Flash (off-peak)Peak rates are double | $0.15 | $0.003 | Miss price, no fee |
Show all 12 modelsShow the first 6 models
USD per million tokens, standard requests. [2] Anthropic docs, Checked 9 November 2026; [6] OpenAI, Checked 9 November 2026; [8] Google, Checked 9 November 2026; [10] DeepSeek API docs, Checked 9 November 2026
How do you calculate prompt caching cost?
Caching is cheaper on the prefix once w + (k − 1) × r < k.
Without a cache
cost = k × (P + U) × input price
With a cache
cost = (P × w + (k − 1) × P × r + k × U) × input price
P cached prefix tokens, k requests per write, U new tokens per request, w and r the write and read multipliers.
| CACHE | WRITE / READ | CHEAPER FROM | SAVING AT 10 |
|---|---|---|---|
| Anthropic, 5-minute cache | 1.25x / 0.1x | 2 requests | 78.5% |
| Anthropic, 1-hour cache | 2x / 0.1x | 3 requests | 71.0% |
| OpenAI, 30-minute cache | 1.25x / 0.1x | 2 requests | 78.5% |
| OpenAI, GPT-6.1 Sol, 30-minute | 1.25x / 0.05x | 2 requests | 83.0% |
| OpenAI, 12-hour cache | 2.5x / 0.1x | 3 requests | 66.0% |
| Google, implicit cache | 1x / 0.05x | 2 requests | 85.5% |
| DeepSeek, disk cache (off-peak) | 1x / 0.02x | 2 requests | 88.2% |
Saving at 10: the prefix saving over 10 requests in one window. [2] Anthropic docs, Checked 9 November 2026; [5] OpenAI docs, Checked 9 November 2026; [8] Google, Checked 9 November 2026; [10] DeepSeek API docs, Checked 9 November 2026
“writing a prefix once and fully reusing it once costs 1.35× its ordinary input cost, compared with 2× for processing it twice without caching”
How much would caching save you?
Three common workloads save 83.5% to 87.3% of input cost.[2][6][10]
Input cost saved
83.5%
No cache, per cache write$2.10
With a cache, per cache write$0.346
- Month, no cache
- $2,100.00
- Month, cached
- $346.00
The three examples, worked out line by line
Coding agent session: 83.5% saved. A 20,000-token prefix (tools, rules, repo map) reused across 50 agent turns inside the 5-minute window, with 1,000 new tokens per turn. Claude Sonnet 5, write 1.25x, read 0.1x, $2/M input.
Without a cache: 50 × (20,000 + 1,000) = 1,050,000 tokens × $2/M = $2.10. With a cache: 20,000 × 1.25 + 49 × 20,000 × 0.1 + 50 × 1,000 = 173,000 tokens × $2/M = $0.346.
Support bot: 86.8% saved. An 8,000-token system prompt and help-center excerpt, 20 questions per 30-minute window, 200 new tokens per question. GPT-6.1 Sol, write 1.25x, read 0.05x, $2/M input.
Without a cache: 20 × (8,000 + 200) = 164,000 tokens × $2/M = $0.328. With a cache: 8,000 × 1.25 + 19 × 8,000 × 0.05 + 20 × 200 = 21,600 tokens × $2/M = $0.0432.
Document Q&A: 87.3% saved. A 30,000-token report asked 10 questions, 300 new tokens per question, off-peak hours. DeepSeek V4.1 Flash, write 1x, read 0.02x, $0.15/M input.
Without a cache: 10 × (30,000 + 300) = 303,000 tokens × $0.15/M = $0.0455. With a cache: 30,000 × 1 + 9 × 30,000 × 0.02 + 10 × 300 = 38,400 tokens × $0.15/M = $0.0058.
Assumptions: input tokens only, since output is billed the same with or without a cache. Every request after the write lands inside the cache lifetime and hits the cache. The Anthropic example uses Claude Sonnet 5 with a 1.25x write and 0.1x read. Prices from the tables above, checked 9 November 2026.
How do you get more cache hits?
Caches match an exact prefix, so one changed token near the top turns everything after it into a miss.
- 1Fixed parts first. Tools, system prompt, documents, history, then the new message. Timestamps go last.[11]
- 2Clear the minimum. A prefix under the minimum is silently not cached.[2][5][7]
- 3Check the usage fields.
cache_read_input_tokensat Anthropic,cached_tokensat OpenAI,prompt_cache_hit_tokensat DeepSeek. A study found 32 caching mistakes in 571 agent projects.[12]
Minimum prefix that can be cached
Tokens. Shorter prompts are processed without caching and without an error.
- Claude Fable 5.1, Opus 5.5, Sonnet 5.5, Haiku 5.5512
- Claude Sonnet 5, Opus 4.81,024
- OpenAI GPT-5.6 and later1,024
- Claude Opus 4.72,048
- Gemini 2.5 Pro and Flash2,048
- Gemini 4 Argon, 3.8 Flash4,096
- Claude Opus 4.6, Haiku 4.54,096
[2] Anthropic docs, Checked 9 November 2026; [5] OpenAI docs, Checked 9 November 2026; [7] Google Gemini API docs, Checked 9 November 2026
All 14 more prompt caching facts
| STAT | WHAT IT MEANS | SOURCE |
|---|---|---|
| ~70% | Token cache-hit rate reported by an example OpenAI deployment of an LLM judge. OpenAI notes this illustrates a possible outcome, not a guarantee. | [5] OpenAI docs, Checked 9 November 2026 |
| 0.025x | Cache read on Claude Fable 5.1: $0.25 against $10 input. | [2] Anthropic docs, Checked 9 November 2026 |
| 15 / min | Requests per minute above which traffic to one cached prefix at OpenAI can overflow to machines without the cache. | [5] OpenAI docs, Checked 9 November 2026 |
| 221 | Tokens: across 10 requests, padding an OpenAI prefix of at least 221 tokens up to the 1,024 minimum is cheaper than not caching it. | [5] OpenAI docs, Checked 9 November 2026 |
| 128 | On models before GPT-5.6, OpenAI rounds reported cached_tokens down to a multiple of 128. GPT-5.6 and later report the exact cached boundary. | [5] OpenAI docs, Checked 9 November 2026 |
| 4 | Cache breakpoints allowed per request at Anthropic. OpenAI also allows up to four cache writes per request. | [2] Anthropic docs, Checked 9 November 2026 |
| 20 blocks | Anthropic's lookback window: each breakpoint checks at most 20 earlier positions for a cached entry. | [2] Anthropic docs, Checked 9 November 2026 |
| $0 | Cost of a cache breakpoint itself at Anthropic. You pay only for writes, reads and uncached input. | [2] Anthropic docs, Checked 9 November 2026 |
| 512 | Minimum cacheable prompt in tokens on Claude Fable 5.1, Opus 5.5, Sonnet 5.5 and Haiku 5.5. Shorter prompts are processed without caching. | [2] Anthropic docs, Checked 9 November 2026 |
| 4,096 | Minimum cacheable prompt in tokens on Claude Opus 4.6, Opus 4.5 and Haiku 4.5, 8x the newest models. | [2] Anthropic docs, Checked 9 November 2026 |
| 4,096 | Minimum tokens for an implicit cache hit on Gemini 4 Argon, 3.8 Flash, 3.6 Flash and 3.1 Pro. Gemini 2.5 models need 2,048. | [7] Google Gemini API docs, Checked 9 November 2026 |
| On | Implicit caching is enabled by default on all Gemini 2.5 and newer models, with no code change. | [7] Google Gemini API docs, Checked 9 November 2026 |
| Seconds | Time DeepSeek's disk cache takes to build. It is best effort, with no 100% hit guarantee, and is cleared within hours to days of last use. | [9] DeepSeek API docs, Checked 9 November 2026 |
| 18 | Upstream fixes, including one in Anthropic's official SDK, after a study of 120 caching pull requests found 32 mis-integrations in 571 agent projects (0.86 precision). | [12] Zhang et al., 26 Oct 2026 |
Are cache reads cheaper on Straitly?
Yes for Claude, GPT, Gemini and Grok. Straitly bills 40% below the published rate with no fee on top, and caching stacks on that.[13]
Every model: LLM API price index. Setup: caching docs. Agent bills: coding agent cost.
- 48 of 51
- models with a cache read below the official price
- 40%
- median gap below the official cache-read price
| MODEL | OFFICIAL | STRAITLY | DIFFERENCE |
|---|---|---|---|
| Claude Opus 5.5 | $0.20 | $0.12 | 40% below |
| Claude Fable 5.1 | $0.25 | $0.15 | 40% below |
| GPT-6 Astra | $1.00 | $0.60 | 40% below |
| GPT-6.1 Sol | $0.10 | $0.060 | 40% below |
| Gemini 4 Argon | $0.10 | $0.060 | 40% below |
| Grok 4.7 | $0.50 | $0.30 | 40% below |
| Claude Haiku 5.5 | $0.010 | $0.0060 | 40% below |
| GPT-6 Luna | $0.010 | $0.0060 | 40% below |
| Gemini 3.8 Flash | $0.075 | $0.045 | 40% below |
| DeepSeek V4.1 Flash | $0.0030 | $0.0018 | 40% below |
| Kimi K3 | $0.30 | $0.15 | 49% below |
| GLM-5.3 | $0.26 | $0.069 | 73% below |
| Claude Sonnet 5.5 | $0.10 | $0.12 | 20% above |
| DeepSeek V4 Pro | $0.022 | $0.026 | 20% above |
Show all 14 modelsShow the first 6 models
Official: Claude [2], GPT [6], Gemini [8], DeepSeek V4.1 Flash [10], others as listed in the price snapshot [15]. Straitly: [14] Straitly, Snapshot 9 November 2026
What do people ask about prompt caching?
Short answers, each drawn from the sources below.
How do I reduce LLM inference costs?
Cache the part of every request you resend. Cache reads cost 0.1x normal input at Anthropic and OpenAI and 0.05x or less on the newest models, and a 2026 study measured 41-80% lower API costs on agent sessions. Then lower the price you pay per token: on Straitly, cache reads are a median 40% below the official price across 51 models.
How much does prompt caching save?
On the cached part of the prompt, up to 90% at Anthropic and OpenAI (reads at 0.1x input), 95% on models with 0.05x reads, and about 98% on DeepSeek. Total savings depend on how much of each request is cached and how often it is reused. A 2026 study measured 41-80% lower API costs on agent sessions.
When does prompt caching cost more than it saves?
When the prefix is written but never read. A 5-minute Anthropic write or 30-minute OpenAI write costs 1.25x, so a single request costs 25% more on the cached part. From the second request in the window, caching is cheaper. A 1-hour Anthropic or 12-hour OpenAI write needs three requests.
Do Gemini and DeepSeek charge for cache writes?
No. Gemini 4 Argon uses implicit caching with no write fee, billing hits at $0.10 per million tokens against $2.00 input. DeepSeek bills a cache miss at the normal input price and a hit at $0.003 per million tokens off-peak on V4.1 Flash.
How long does a prompt cache last?
Anthropic: 5 minutes by default, refreshed free on each hit, or 1 hour at a higher write price. OpenAI GPT-5.6 and later: 30 minutes by default, or 12 hours in the Responses API. DeepSeek clears unused caches within a few hours to a few days. Gemini manages implicit caches itself.
Cache the prefix, pay 40% below list
One OpenAI-compatible API for Claude, GPT, Gemini and Grok. No fee, no subscription, no minimum.
Sources and method
How these numbers were checked
Every price and rule was read from the provider's own documentation on 9 November 2026. Prices are list prices in USD per million tokens for standard (non-batch) requests. Worked examples count input tokens only and assume every request after the write hits the cache. Straitly cache-read prices come from the catalog snapshot of 9 November 2026.
- [1]2026: The State of Enterprise AI Menlo Ventures, Nov 2026, survey fielded Sep 2026
- [2]Prompt caching Anthropic docs, Checked 9 November 2026
- [3]Claude API pricing Anthropic, Checked 9 November 2026
- [4]Prompt caching with Claude Anthropic, Page dated 14 Aug 2025
- [5]Prompt caching guide OpenAI docs, Checked 9 November 2026
- [6]API pricing OpenAI, Checked 9 November 2026
- [7]Context caching Google Gemini API docs, Checked 9 November 2026
- [8]Gemini Developer API pricing Google, Checked 9 November 2026
- [9]Context caching DeepSeek API docs, Checked 9 November 2026
- [10]Models and pricing DeepSeek API docs, Checked 9 November 2026
- [11]Don't Break the Cache: An Evaluation of Prompt Caching for Long-Horizon Agentic Tasks Lumer et al., arXiv 2601.06007, 9 Jan 2026
- [12]Silent and Costly: Characterizing and Detecting Prompt-Caching Mis-Integration in LLM Agents Zhang et al., arXiv 2610.34817, 26 Oct 2026
- [13]Straitly pricing Straitly, Checked 9 November 2026
- [14]Straitly live model catalog Straitly, Snapshot 9 November 2026
- [15]Straitly price snapshot vs official list and OpenRouter (164 models) Straitly, Snapshot 9 November 2026