Sections (13)▾
- 01Prompt caching price comparison across providers
- 02The same weights can have different cache prices
- 03What writes, reads and cache lifetimes mean
- 04Claude: choose a breakpoint and lifetime
- 05OpenAI: write premiums depend on the generation
- 06Gemini: storage is a separate line item
- 07DeepSeek, xAI and Groq: automatic does not mean permanent
- 08When does a cache write pay for itself?
- 09What a 20-turn agent session costs
- 10Prompt caching vs semantic caching
- 11Find cache misses before changing models
- 12Compare provider caching with Requesty
- 13What to do this week
As of October 2026, a million cached input tokens cost $0.20 on the direct Claude Opus 5.5 API and $0.10 on OpenAI's GPT-6.1 Sol API. Prompt caching reuses a processed prefix and discounts input; the model still generates an answer. To skip the model call, use a response cache where replay is safe. If you are new to the mechanics, start with what prompt caching is and how it works. For Claude write prices, minimum prefix lengths and hit rates, see Anthropic prompt caching.
Prompt caching price comparison across providers
These are direct provider API prices as of October 2026, in US dollars per million text tokens. They are standard rates before gateway fees, taxes, batch discounts and regional premiums. OpenAI rows use short-context rates below 272,000 input tokens; Haiku 5.5 uses prompts up to 100,000; Grok 4.7 uses prompts below 200,000. Higher context tiers cost more.
A write price is the total price for written tokens, not a surcharge to add to ordinary input. Input in the write column means ordinary input pricing with no separate write premium stated. The read discount is 1 - read price / input price. Paired write prices follow the lifetime order shown in each row. For GPT-6.1 Sol, GPT-6.1 Terra and GPT-6 Luna, 12-hour writes are available on the Responses API; 30-minute writes are the default.
| Direct API and model | Input | Cache write | Read (discount) | Output | Lifetime and activation |
|---|---|---|---|---|---|
| Anthropic Claude Fable 5.1 | $10 | $12.50 / $20 | $0.25 (97.5%) | $50 | 5-minute / 1-hour minimum; opt in |
| Anthropic Claude Opus 5.5 | $4 | $5 / $8 | $0.20 (95%) | $20 | 5-minute / 1-hour minimum; opt in |
| Anthropic Claude Sonnet 5.5 | $2 | $2.50 / $4 | $0.10 (95%) | $10 | 5-minute / 1-hour minimum; opt in |
| Anthropic Claude Haiku 5.5 | $0.10 | $0.125 / $0.20 | $0.01 (90%) | $0.50 | 5-minute / 1-hour minimum; opt in |
| OpenAI GPT-6.1 Sol | $2 | $2.50 / $5 | $0.10 (95%) | $10 | 30-minute / 12-hour minimum; implicit or explicit |
| OpenAI GPT-6.1 Terra | $1 | $1.25 / $2.50 | $0.05 (95%) | $5 | 30-minute / 12-hour minimum; implicit or explicit |
| OpenAI GPT-6 Luna | $0.10 | $0.125 / $0.25 | $0.01 (90%) | $0.50 | 30-minute / 12-hour minimum; implicit or explicit |
| OpenAI GPT-5.5 | $5 | Input | $0.50 (90%) | $30 | Automatic; up to 24-hour retention |
Sources: Anthropic Claude pricing and caching, OpenAI pricing and OpenAI cache guide.
The following direct API rates use the same USD per million text token scope. Gemini explicit storage is priced per million tokens per hour. For standard list prices next to measured latency, see our GPT vs Claude vs Gemini price and latency comparison.
| Direct API and model | Input | Cache write | Read (discount) | Output | Lifetime and activation |
|---|---|---|---|---|---|
| Google Gemini 4 Argon | $2 | Input | $0.10 (95%) | $10 | Automatic; 24-hour retention TTL |
| Google Gemini 3.8 Flash | $0.75 | Implicit: input rate; explicit: $0.50 per 1M tokens per hour storage; check creation billing | $0.075 (90%) | $3.75 | Automatic or explicit; see below |
| DeepSeek V4.1 Flash 1017, peak | $0.30 | Input | $0.006 (98%) | $1.20 | Automatic; provider-managed |
| DeepSeek V4 Pro 0813, peak | $1.32 | Input | $0.044 (96.67%) | $3.96 | Automatic; provider-managed |
| xAI Grok 4.7 | $2 | Input | $0.50 (75%) | $6 | Automatic; eviction can occur at any time |
| Groq-hosted OpenAI GPT-OSS 120B | $0.15 | Input | $0.075 (50%) | $0.60 | Automatic; expires after 2 hours of inactivity |
Sources: Gemini API pricing and caching, DeepSeek pricing, xAI pricing, and Groq model pricing.
Google's listed Gemini 4 Argon rates are promotional through November 30, 2026; Gemini 3.8 Flash rates are promotional through December 31. DeepSeek's rates above are peak prices; its price card lists lower off-peak rates and the applicable hours. Processing tiers and hosting platforms can also change the rate. On Amazon Bedrock, check the model and API: prompt caching is supported on on-demand endpoints, but not its batch inference API.
A bigger discount does not mean a lower read price. Fable 5.1 reads cost $0.25 per million, 97.5% below its $10 input rate. GPT-6 Luna reads cost $0.01 per million, 90% below its $0.10 input rate. Compare output prices and task quality too.
The same weights can have different cache prices
The host decides the price, not the model. These October 2026 rates are for direct, synchronous GPT-OSS 120B calls, in USD per million tokens, before gateway fees.
| Host and tier | Input | Cache read | Read discount | Output |
|---|---|---|---|---|
| Fireworks Serverless Standard | $0.15 | $0.015 | 90% | $0.60 |
| Groq on-demand | $0.15 | $0.075 | 50% | $0.60 |
Fireworks charges 80% less for the same number of cached tokens: ($0.075 - $0.015) / $0.075 = 80%. Fireworks' default endpoint has no regional restriction; Groq's model price card does not specify an inference region. Compare hit rates and task costs on the routes you would use. Fireworks caching is enabled by default, and Groq caching is automatic for this model.
What writes, reads and cache lifetimes mean
A cache write saves eligible prefix computation for later requests. A cache read uses a matching saved prefix. The remaining input is processed, and output is billed separately. The cache lifetime describes how long an entry is kept or eligible, depending on the provider; it is not a promise that every subsequent request hits.
Claude: choose a breakpoint and lifetime
On the direct Claude Messages API, set cache_control at the top level for a moving automatic breakpoint or on a content block for an explicit boundary. For separate questions about the same document, put an explicit breakpoint at the end of the stable document. A moving breakpoint on each changing question can write the suffix repeatedly without a reusable document-only entry. Use the moving breakpoint for append-only conversations. Anthropic's caching guide explains the lookup and write behavior.
The default 5-minute write costs 1.25 times input; the 1-hour write costs twice input. These are minimum lifetimes, and reads refresh the entry. The clock starts when the writing or reading request starts, so a long response consumes part of that window.
Fable 5.1, Opus 5.5, Sonnet 5.5 and Haiku 5.5 need a cacheable prefix of at least 512 tokens. A shorter marked prefix does not produce a cache entry. The direct Sonnet 5.5 read rate in the table follows Anthropic's current price table and price announcement. For hit rates by coding agent, see our Claude Code prompt caching guide.
OpenAI: write premiums depend on the generation
For GPT-5.6 and later, OpenAI enables implicit caching by default. The minimum is 1,024 visible tokens. The default 30-minute write costs 1.25 times input; the Responses API also supports a 12-hour minimum at 2.5 times input. OpenAI can retain entries longer than those minimums. A read of a 12-hour entry does not restart a 12-hour clock.
Explicit mode lets you choose the boundary, which is useful when a changing question after a shared document is unlikely to be reused. GPT-5.5 follows older implicit-only rules and has no added write charge. Its extended retention is usually around 30 minutes and can be up to 24 hours, according to the same guide.
Gemini: storage is a separate line item
Gemini GenerateContent enables implicit caching for Gemini 2.5 and newer. Its listed implicit minimum is 4,096 tokens for Gemini 4 Argon and Gemini 3.8 Flash. Google's Developer API retention page specifies a 24-hour implicit in-memory retention TTL; a hit is not guaranteed for that entire period.
Gemini 3.8 Flash also supports an explicitly created named cache. Its TTL defaults to one hour and is configurable. During the current promotion, explicit storage costs $0.50 per million cached tokens per hour, in addition to usage charges. Storing 100,000 tokens for one hour costs 0.1 × $0.50 = $0.05. Google lists $1 per million tokens per hour from January 1, 2027. Check creation-processing billing separately for the direct Gemini API. Gemini 4 Argon supports implicit caching only. The direct Gemini API and Google Cloud use separate rate cards and cache rules.
DeepSeek, xAI and Groq: automatic does not mean permanent
DeepSeek uses automatic, best-effort caching and says unused entries are normally cleared within hours to days. xAI can evict entries at any time. Groq expires its supported cached data after two hours without use. A stable prefix is necessary, but the next request still needs to find an eligible entry.
When does a cache write pay for itself?
For one fixed prefix, let I be the ordinary input rate, W the total write rate and R the read rate. If the prefix is written once and fully read n times, caching costs W + n × R; sending the same prefix without caching costs (n + 1) × I. Caching saves money when n > (W - I) / (I - R), assuming I > R and no expiry or other charges.
Take Claude Opus 5.5, where I = $4 and R = $0.20 per million tokens. For a 5-minute write, W = $5: one full read gives $5 + $0.20 = $5.20, against $8 for two uncached sends. For a 1-hour write, W = $8: one read costs $8.20 against $8, but two reads cost $8.40 against $12.
The longer lifetime pays for its premium only when it saves enough rewrites across the gaps in your traffic. Test your schedule, not just the price.
What a 20-turn agent session costs
Assume a direct Claude Opus 5.5 session with 20 sequential model calls. The first input is a cold 10,000-token prefix, including its initial user message. Each call generates 400 output tokens; each following input appends those 400 tokens and a 600-token client-side tool result. History is append-only.
Use Claude's 5-minute automatic breakpoint on every call. Assume each next call starts before the previous entry expires, the prior breakpoint is within the lookup window and all 19 later prefixes hit. Ignore framing tokens, retries, tool charges and fees. Anthropic's rates and incremental caching rules give input at $4, writes at $5, reads at $0.20 and output at $20 per million tokens.
The inputs total 20 × 10,000 + 1,000 × (0 + 1 + ... + 19) = 390,000 tokens. The session produces 20 × 400 = 8,000 output tokens. The final output is billed but is not sent back during these 20 calls.
| Charge | Without caching | With caching |
|---|---|---|
| Ordinary input | 390,000 tokens × $4 / 1M = $1.56 | $0 |
| Cache writes | $0 | 29,000 tokens × $5 / 1M = $0.145 |
| Cache reads | $0 | 361,000 tokens × $0.20 / 1M = $0.0722 |
| Output | 8,000 tokens × $20 / 1M = $0.16 | 8,000 tokens × $20 / 1M = $0.16 |
| Total | $1.72 | $0.3772 |
The 29,000 written tokens are the initial 10,000 plus 19 additions of 1,000. The rest are reads: 390,000 - 29,000 = 361,000. The total saving is $1.72 - $0.3772 = $1.3428, or 78.1% of the uncached bill. That is lower than the 95% read discount because writes and output still cost money.

Now, the not so great news: if every one of the 390,000 input tokens instead becomes a 5-minute write, input costs $1.95; adding output makes $2.11, or 22.7% more than the uncached case. A partial miss need not rewrite the whole prompt. Inspect the actual write count before attributing the bill to misses.
Run the calculator with your own token counts. Enter total tokens for each category, not millions. The comparison holds the input and output counts constant and uses your selected ordinary input rate for the uncached baseline.
Compare your prompt cache bill
Enter total tokens per category, not millions. Rates are USD per 1 million tokens.
- Ordinary input
- $0.00
- Cache writes
- $0.145
- Cache reads
- $0.0722
- Output
- $0.16
- Extra cache costs
- $0.00
- With caching
- $0.3772
- Without caching
- $1.72
Caching saves $1.3428 (78.1% less)
The Fable 5.1 cache-read price cut is another example of why a headline read discount and an observed task saving differ. Compare models on cost per accepted task, including retries and review. Models may need different token counts and produce different results. For coding agents, Claude Code vs Codex compares cost per solved task. For how plan prices and API spend compare in coding tools, see our Claude Code vs Cursor comparison.
Prompt caching vs semantic caching
A provider prompt cache stores reusable computation for a matching prefix. An exact response cache looks up a matching request and returns a stored answer. A semantic response cache searches for a sufficiently similar request and returns a stored answer. The latter two can avoid both input and output charges for the skipped model call, but their own lookups, storage and any embeddings have costs.
| Approach | Reused item | Model call on a hit? | Main design question |
|---|---|---|---|
| Provider prompt cache | Processed prefix | Yes, for a new answer | Is the prefix stable and eligible? |
| Exact response cache | Stored answer for a matching request | No | Does the full request key capture permissions and version? |
| Semantic response cache | Stored answer for a similar request | No | Is this similar request safe to answer with the stored result? |

For response replay, LiteLLM supports exact-match and semantic caches with configured backends; Redis LangCache provides a semantic cache service. Use provider prompt caching for repeated prefixes that still need a fresh answer.
For response caching, scope entries by tenant and permissions, include model and prompt versions in the key, set an expiry or invalidation rule, and test wrong matches and stale answers. Bypass response caching for requests that must execute a side-effecting tool or use current account state. A semantic match on two similar account questions must not expose one customer's answer to another. For the full decision, see prompt caching vs semantic caching.
Find cache misses before changing models
Start with the share of input tokens served as cache reads. A request that reads 100 cached tokens out of 50,000 and one that reads 49,000 both count as hits, but they produce different bills.
Deriv reported that 85.8% of its Amy assistant's input tokens were served from cache. At the GPT-5 rates used in its July 2026 calculation, that corresponded to a 77% reduction in input-token cost against an uncached baseline: 85.8% × (1 - $0.125 / $1.25) = 77.22%. Deriv's calculation covers input, not the entire model bill.
Prompt cache diagnostic checklist
0 of 7 done
A timestamp or reordered tool schema near the start can prevent reuse from that change onward. Earlier independently cached prefixes can still match. A fallback to another backend can start cold, so include its write cost in the availability tradeoff. Claude makes an entry available after the first response begins; concurrent cold requests can create multiple writes. See Anthropic's prefix and breakpoint rules and OpenAI's cache diagnostics.
For DeepSeek, two requests with the same prefix and different suffixes can both miss while the service identifies and persists the shared prefix; a later request can hit. For xAI Chat Completions, keep x-grok-conv-id stable across related requests to improve server affinity; for Responses use prompt_cache_key.
Token denominators differ by API. In the direct Claude Messages API, total input is input_tokens + cache_creation_input_tokens + cache_read_input_tokens. In OpenAI Responses, usage.input_tokens is the total. Subtract usage.input_tokens_details.cached_tokens and usage.input_tokens_details.cache_write_tokens to find ordinary input. For DeepSeek, use its prompt_cache_hit_tokens and prompt_cache_miss_tokens fields. Sources: Claude usage, OpenAI usage, and DeepSeek usage.
Compare provider caching with Requesty
We make Requesty, an LLM gateway. Its auto caching adds Claude cache breakpoints for you, so your agent can get cache-read discounts without adding markers to its prompts. OpenAI, Gemini implicit caching and DeepSeek manage caching on their own. The provider holds the prefix cache, and your application still sends the conversation. For Anthropic models, use manual caching when you need to choose the boundary yourself.
To try two questions against the same Claude context, create a Requesty account, create an API key, add credits for the paid model, and set REQUESTY_API_KEY. Install the openai Python package and put a stable document of at least 512 tokens in knowledgebase.txt.
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["REQUESTY_API_KEY"],
base_url="https://router.requesty.ai/v1",
)
context = open("knowledgebase.txt", encoding="utf-8").read()
for question in ["Summarize the main points.", "What are the exceptions?"]:
result = client.chat.completions.create(
model="anthropic/claude-opus-5-5",
messages=[
{"role": "system", "content": context},
{"role": "user", "content": question},
],
extra_body={"requesty": {"auto_cache": True}},
)
print(result.usage)The first call writes an eligible prefix. On a hit, the second reads it. In the Chat Completions response, inspect cache usage fields: usage.prompt_tokens_details.caching_tokens for writes and usage.prompt_tokens_details.cached_tokens for reads. Inspect usage.cost for the request cost. Compare token cache rates and savings by model in the Savings tab.
The tables above are for direct APIs. Requesty pay-as-you-go pricing has a 5% fee on top of prepaid credit top-ups, with no seat fees or minimums. See Requesty pricing.
What to do this week
Of the direct rates in the table, DeepSeek V4.1 Flash has the lowest listed cache-read price: $0.006 per million tokens at peak. Pick it for an agent trial if the model meets your task's quality bar. A low read price on its own will not give you the lowest session bill: writes, output and retries count too.
So what do you do this week? Measure cached-read tokens as a share of all input tokens per session, then compare the full cost per accepted task. That tells you whether a cheaper read price applies to enough of your workload to change the decision.
FAQ
How much does prompt caching cost across LLM providers?+
As of October 2026, direct Anthropic Claude Opus 5.5 cache reads cost $0.20 per million input tokens, while direct OpenAI GPT-6.1 Sol reads cost $0.10. Both charge more than ordinary input for a cache write, and prices differ by model, provider and cache lifetime.
What is a cache read price?+
A cache read price is the rate for eligible input tokens whose previously processed prompt prefix is reused. Anthropic, OpenAI and other providers still charge separately for newly processed input and generated output.
Does OpenAI charge for prompt cache writes?+
For GPT-5.6 and later, OpenAI charges 1.25 times the ordinary input rate for a default 30-minute cache write. The Responses API also supports a 12-hour minimum at 2.5 times the ordinary input rate; GPT-5.5 has no additional write charge.
When does Claude prompt caching break even?+
For a fixed Claude prefix written once, a 5-minute write followed by one full cache read costs less than processing that prefix twice without caching. A 1-hour write needs two full reads at current Claude rates, assuming the entry stays eligible and no other costs change.
What is the difference between prompt caching and semantic caching?+
Provider prompt caching reuses the computation for an identical prompt prefix while the model generates a new answer. A semantic response cache looks for a similar request and returns a stored answer, so it needs controls for wrong matches, permissions and stale content.
Why is my prompt cache read count zero?+
A first request is cold, and later requests may miss if the prefix is too short, changes before the breakpoint, expires or reaches a different backend. Check the provider's token counts and diagnostics, then compare the actual prefix and request timing.
Related notes
- Fable 5.1 cut cache reads 75% to $0.25 per million: the launch line nobody screenshottedCost Optimization · Sep 2026 · 5m
- Cheapest LLM API Prices Compared (2026): Provider by Provider Cost GuideCost Optimization · Jul 2026 · 5m
- The same benchmark suite costs $0.05 on one model and $3.69 on another: stop comparing price per tokenPricing · Sep 2026 · 4m
