Key takeaways
- Cache reads cost 5% of input on Claude Opus 5.5, Sonnet 5.5 and GPT-6.1 Sol, 2.5% on Fable 5.1.
- One read repays a 1.25x cache write; a write never read costs 25% more than no caching.
- Gemini’s explicit caches add storage, $4.50 per million tokens per hour on Gemini 3.1 Pro.
- In a worked 30-call agent task, caching cut Claude Sonnet 5.5’s cost from $2.61 to $0.44.
- One build of our own pipeline served only 19,712 of its 668,397 input tokens from cache.
Prompt caching cuts the price of input served from cache by 90% to 97.5% on current Claude, OpenAI and Gemini text models, as of 15 October 2026. A cache read costs 2.5% of the input price on Claude Fable 5.1, 5% on Claude Opus 5.5, Claude Sonnet 5.5, GPT-6.1 Sol and Gemini 4 Argon, and 10% on most other current models from the three. What differs is the cost around that discount. Claude and OpenAI’s GPT-5.6 and later charge 1.25 times the input price to write an entry. Gemini’s explicit caches add an hourly storage fee. Default lifetimes run from 5 minutes on Claude to an hour on Gemini’s explicit caches.
The write fee is what lets caching backfire. One read repays a 1.25x write, but a write that is never read costs 25% more than sending the prompt uncached. In a single-turn app, that is what happens on every request if you let Claude or OpenAI’s newer models place the cache point for you.
Below are each provider’s rules and prices, three worked examples with the arithmetic shown, the usual causes of misses and a checklist. DeepSeek, xAI and Moonshot get a shorter look.
Prompt caching prices and rules on six APIs
Multipliers in this table are relative to each model’s standard input price, as of 15 October 2026.
| Provider and models | How it’s switched on | Minimum prefix | Lifetime | Write | Read | Storage |
|---|---|---|---|---|---|---|
| Claude Fable 5.1 | cache_control at the top level (automatic) or on up to 4 blocks |
512 tokens | 5 min, or 1 h; each hit resets it | 1.25x (5 min), 2x (1 h) | 0.025x | None |
| Claude Opus 5.5, Sonnet 5.5 | As above | 512 | As above | As above | 0.05x | None |
| Claude Haiku 5.5 and older Claude models | As above | 512 to 4,096, by model | As above | As above | 0.1x | None |
| GPT-6.1 Sol | On by default, with implicit or explicit cache points | 1,024 | At least 30 min after the last write or hit | 1.25x | 0.05x | None |
| GPT-6 Astra, GPT-6 Luna | As above | 1,024 | As above | 1.25x | 0.1x | None |
| OpenAI models before GPT-5.6 | On by default, implicit only | Varies with request settings | About 5 to 10 min idle, or up to 24 h with extended retention | None | Varies by model | None |
| Gemini 4 Argon | Implicit only | 4,096 | Not documented | None | 0.05x | None |
| Gemini 3 models, implicit | On by default | 4,096 | Not documented | None | 0.1x | None |
| Gemini 3 models, explicit | Create a cache object, then reference it | Varies by model | You set it, 1 h by default | Input price, per Google Cloud’s docs | 0.1x | Per million tokens per hour |
| DeepSeek V4.1-Flash, V4-Pro | On by default | Not documented | Cleared hours to days after last use | None | 0.02x, 0.033x | None |
| xAI Grok 4.7 | On by default | Not documented | No guarantee | None | 0.25x | None |
| Moonshot Kimi K3 | On by default, with a 5 min or 1 h lifetime | Not documented | 5 min or 1 h; each hit resets it | 1x (5 min), 2x (1 h) | 0.1x | None |
Prices in US dollars per million tokens, as of 15 October 2026:
| Model | Input | Cache write | Cache read | Storage per hour | Output |
|---|---|---|---|---|---|
| Claude Fable 5.1 | $10.00 | $12.50 (5 min), $20.00 (1 h) | $0.25 | – | $50.00 |
| Claude Opus 5.5 | $4.00 | $5.00, $8.00 | $0.20 | – | $20.00 |
| Claude Sonnet 5.5 | $2.00 | $2.50, $4.00 | $0.10 | – | $10.00 |
| Claude Haiku 5.5, prompts up to 100K | $0.10 | $0.125, $0.20 | $0.01 | – | $0.50 |
| GPT-6 Astra | $10.00 | $12.50 | $1.00 | – | $50.00 |
| GPT-6.1 Sol | $2.00 | $2.50 | $0.10 | – | $10.00 |
| GPT-6 Luna | $0.10 | $0.125 | $0.01 | – | $0.50 |
| Gemini 4 Argon | $2.00 | – | $0.10 | – | $10.00 |
| Gemini 3.1 Pro Preview, prompts up to 200K | $2.00 | – | $0.20 | $4.50 | $12.00 |
| Gemini 3.8 Flash | $0.75 | – | $0.075 | $0.50 | $3.75 |
| Gemini 3.5 Flash-Lite | $0.30 | – | $0.03 | $1.00 | $2.50 |
| DeepSeek V4.1-Flash, peak | $0.30 | – | $0.006 | – | $1.20 |
| DeepSeek V4-Pro, peak | $1.32 | – | $0.044 | – | $3.96 |
| Grok 4.7, prompts under 200K | $2.00 | – | $0.50 | – | $6.00 |
| Kimi K3 | $3.00 | $3.00 (5 min), $6.00 (1 h) | $0.30 | – | $15.00 |
Both tables come from the providers’ own pages, cited in the footnotes for Anthropic,12 OpenAI,34 Google,567 DeepSeek,89 xAI1011 and Moonshot.1213
Two of these prices are new. Anthropic cut Sonnet 5.5’s cache reads from $0.20 to $0.10 per million on 7 October,14 and Gemini 4 Argon became generally available on 13 October at introductory prices that double on 1 December.15 Gemini 3.8 Flash’s prices, storage included, double on 1 January 2027.6 Long prompts raise cache prices too. Gemini 3.1 Pro charges $0.40 for cached input above 200,000 tokens, and GPT-6.1 Sol doubles its input and cache rates above 272,000 tokens.16
DeepSeek caches to disk by default with no write fee. A hit costs 2% of the miss price on V4.1-Flash and 3.3% on V4-Pro, and off-peak prices are half the peak ones.9 A hit needs a whole stored prefix to match. DeepSeek stores prefixes at the end of each request’s input and output, and stores a prefix it sees shared across requests, so in its own long-document example the third question is the first to hit. Unused entries are usually cleared within hours to days.8
xAI caches automatically with no write fee, and Grok 4.7’s cached input costs $0.50 per million against $2.00, the smallest discount here.11 Entries can be evicted at any time, and an x-grok-conv-id header routes related requests to the same server.10 Moonshot’s Kimi K3 has two lifetimes, like Claude, with a 5-minute write at the input price and a 1-hour write at double.12
Claude prompt caching: cache points and two lifetimes
On Claude you switch caching on per request. Automatic caching is one cache_control field at the top level, which puts the cache point on the last cacheable block and moves it forward as a conversation grows. Explicit caching puts cache_control on up to four blocks of your choice. The prefix runs in the order tools, system, messages, so a changed tool definition invalidates everything after it.1
A write happens only at a cache point. On the next request, the API looks back up to 20 blocks from your cache point for an entry that an earlier request wrote. It doesn’t find stable content by itself. So if the cache point sits on a block that changes every time, such as one holding a timestamp or the user’s message, every request writes and none reads. Anthropic’s docs say automatic caching falls into this trap when the last block is the one that changes.1
The default lifetime is 5 minutes, refreshed free by each hit, and the 1-hour lifetime costs 2x to write. The clock starts when a request begins, so after a response that streams for 4 minutes, the next request has about a minute. Prompts under the minimum, 512 tokens on current models, are processed uncached without an error. Cache hits don’t count against rate limits, and the multipliers stack with the batch discount and the 1.1x charge for US-only inference.12 Anthropic’s cache diagnostics reports where a request diverged from the previous one.17
OpenAI prompt caching on GPT-5.6 and later
OpenAI caches by default. On GPT-5.6 and later, including the three GPT-6 models, a write costs 1.25x the input price and a read 0.1x, or 0.05x on GPT-6.1 Sol. The write rate replaces the normal rate for those tokens. Earlier models charge nothing to write.34
In implicit mode, which applies out of the box, OpenAI puts the cache point at the end of the latest eligible message, usually the last user message or tool result. In explicit mode (prompt_cache_options.mode: "explicit"), only blocks you mark with prompt_cache_breakpoint are written, and anything after the last mark is billed at the normal rate with no write charge. A request can create up to four writes. The minimum is 1,024 visible tokens, and the one lifetime setting, 30m, keeps an entry usable for at least 30 minutes after its last write or hit.3
On older models, a stable prompt_cache_key helps route related requests to the same machine. From GPT-5.6, OpenAI routes on its own, and the key only separates cache accounting between your customers. Cached tokens still count toward tokens-per-minute limits.
One change catches teams moving from older models. In implicit mode, a fixed developer message followed by a changing user message writes through the user message, and the next request can’t reuse that entry. OpenAI lists this under “Gotchas” and recommends an explicit breakpoint after the static content.3
Gemini context caching: implicit hits and hourly storage
Gemini has two mechanisms. Implicit caching is on by default for Gemini 2.5 and newer and gives the discount when a request happens to hit, with no guarantee. Its minimum is 4,096 tokens on Gemini 4 Argon, 3.8 Flash, 3.6 Flash and 3.1 Pro Preview. Google advises putting large, common content first and sending similar requests close together, and doesn’t publish how long implicit entries last.5
Explicit caching guarantees the discount. You create a cache object, such as a system instruction plus a document, give it a lifetime (one hour by default, with no minimum or maximum) and reference it by name in later requests. It is in beta, works only through the generateContent API, and isn’t available on Gemini 4 Argon or later models.518
Storage is billed for the lifetime you set, at $4.50 per million tokens per hour on Gemini 3.1 Pro Preview, $0.50 on 3.8 Flash and $1.00 on 3.5 Flash-Lite.6 The Gemini API pages don’t price the write. Google Cloud’s documentation for the same models says cache creation is billed at the standard input price and that implicit caching has no storage cost,7 and we assume the same on the Gemini API. Cached tokens count toward rate limits.5
How many reads repay a cache write
Put the input price at 1. A prefix written once at multiplier w and read N times at multiplier r costs w + N × r, against N + 1 without caching. Caching wins once N × (1 − r) is larger than w − 1. If each request either reads the whole prefix or writes it, caching saves money once the share of hits passes (w − 1) ÷ (w − r).
| Pricing | Where it applies | Reads that repay one write | Share of requests that must hit |
|---|---|---|---|
| Write 1.25x, read 0.1x or less | Claude 5-minute cache, OpenAI GPT-5.6 and later | 1 | 20% to 22% |
| Write 2x, read 0.1x or less | Claude 1-hour cache, Kimi K3 1-hour cache | 2 | 51% to 53% |
| Writes billed as normal input | Gemini implicit, DeepSeek, xAI, Kimi K3 5-minute cache, OpenAI before GPT-5.6 | 0 | Any hit saves |
| Input price to create, plus storage | Gemini explicit | 2 to 5 uses in the first hour | Depends on the hours stored |
Anthropic’s pricing page states the same break-even points for its two lifetimes.2 On Gemini’s explicit caches, each read saves 0.9 times the input price, so an hour of storage needs $0.50 ÷ $0.675 = 0.74 uses on Gemini 3.8 Flash. It needs $4.50 ÷ $1.80 = 2.5 on 3.1 Pro at the up-to-200K rates, and $1.00 ÷ $0.27 = 3.7 on 3.5 Flash-Lite. Counting the creation call, a one-hour cache breaks even at 2, 4 and 5 uses. Implicit caching gives the same read price with no storage when it hits, so pay for explicit caching when you need the hit guaranteed.
Three worked examples with the arithmetic
These use the list prices above and our own assumptions. No traffic was measured, and reasoning tokens are left out.
A chat assistant with a long system prompt
- An 8,000-token system prompt, the same for every user.
- Single-turn requests, each a 500-token user message with a 300-token reply.
- Traffic steady enough that the cache never expires.
Per 1,000 requests on Claude Sonnet 5.5, no caching costs 8.5 million tokens × $2 + 0.3 million × $10 = $20.00. With the cache point after the system prompt, it costs 8 million × $0.10 + 0.5 million × $2 + 0.3 million × $10 = $4.80.
| Model, per 1,000 requests | No caching | Cache point after the system prompt | Cache point on the user message |
|---|---|---|---|
| Claude Sonnet 5.5 | $20.00 | $4.80 | $24.25 |
| GPT-6.1 Sol | $20.00 | $4.80 | $24.25 |
| Claude Haiku 5.5 | $1.00 | $0.28 | $1.21 |
| Gemini 4 Argon, implicit | $20.00 | $4.80 if every request hits | – |
| Gemini 3.8 Flash, implicit | $7.50 | $2.10 if every request hits | – |
| DeepSeek V4.1-Flash, peak | $2.91 | $0.56 | – |
Sonnet 5.5 and GPT-6.1 Sol come out level because their input, write and read prices match. The last column is the trap. Claude’s automatic caching and OpenAI’s implicit mode both put the cache point on the user message here, so every request writes 8,500 tokens at 1.25x and reads nothing. That costs 21% more than not caching. An explicit cache point at the end of the fixed content fixes it, on Claude:
{
"system": [
{"type": "text", "text": "<8,000 tokens of instructions and examples>",
"cache_control": {"type": "ephemeral"}}
],
"messages": [{"role": "user", "content": "<the user's message>"}]
}
and on OpenAI’s Responses API:
{
"prompt_cache_options": {"mode": "explicit"},
"input": [
{"role": "developer", "content": [
{"type": "input_text", "text": "<8,000 tokens of instructions and examples>",
"prompt_cache_breakpoint": {"mode": "explicit"}}
]},
{"role": "user", "content": "<the user's message>"}
]
}
An agent re-sending a growing history
- 30 model calls in one task, with a 10,000-token prefix of system prompt and tools.
- Each call adds 2,000 tokens, the previous reply plus a tool result, and returns 500 tokens.
- Calls are seconds apart.
The 30 calls send 1,230,000 input tokens in total. With the cache point at the end of each prompt, each call reads the previous prompt and writes 2,000 new tokens. That is 1,160,000 tokens read and 70,000 written, since the first call writes all 12,000. On Claude Opus 5.5, the task costs 1.23 million × $4 + 15,000 × $20 = $5.22 uncached, and 1.16 million × $0.20 + 70,000 × $5 + 15,000 × $20 = $0.88 cached.
| Model, one 30-call task | No caching | With caching | Saving |
|---|---|---|---|
| GPT-6 Astra | $13.05 | $2.79 | 79% |
| Claude Opus 5.5 | $5.22 | $0.88 | 83% |
| Claude Sonnet 5.5 | $2.61 | $0.44 | 83% |
| GPT-6.1 Sol | $2.61 | $0.44 | 83% |
| Gemini 4 Argon, implicit | $2.61 | $0.41 if every call hits | 84% |
| Gemini 3.8 Flash, implicit | $0.98 | $0.20 if every call hits | 80% |
| DeepSeek V4.1-Flash, peak | $0.39 | $0.05 | 88% |
Here 94% of input tokens come from the cache, and Opus 5.5 with a warm cache costs about a third of Sonnet 5.5 without one. Pauses are the risk. If call 16 arrives after Claude’s 5-minute lifetime, Sonnet 5.5 rewrites 42,000 tokens for $0.105 instead of $0.009, which adds 22% to the task. Agents that wait on people or long test runs should use Claude’s 1-hour lifetime, while OpenAI’s 30 minutes covers most such pauses.
Questions over a 200,000-token document
- A 200,000-token prefix of instructions and the document.
- Ten independent 100-token questions with 500-token answers.
- Either all ten in one sitting, or one every 6 minutes for an hour.
- The cache point after the document. OpenAI needs an explicit breakpoint here, because the implicit one would land on each question.
Ten questions cost $4.05 on Sonnet 5.5 without caching. With a 5-minute cache in one sitting, the first question writes the document for $0.50 and the other nine read it for $0.02 each. With question and answer tokens, that is $0.5052 + 9 × $0.0252 = $0.73.
| Model | No caching | Setup | One sitting | One every 6 minutes |
|---|---|---|---|---|
| Claude Sonnet 5.5 | $4.05 | 5-minute cache | $0.73 | $5.05 |
| Claude Sonnet 5.5 | $4.05 | 1-hour cache | $1.03 | $1.03 |
| GPT-6.1 Sol | $4.05 | Explicit breakpoint | $0.73 | $0.73 |
| Gemini 3.8 Flash | $1.52 | Implicit | $0.30 if repeats hit | Lifetime not documented |
| Gemini 3.8 Flash | $1.52 | Explicit, one-hour lifetime | $0.42 | $0.42 |
| DeepSeek V4.1-Flash, peak | $0.61 | Automatic; first two questions miss | $0.14 | $0.14 |
With 6-minute gaps, a 5-minute cache never hits and costs a quarter more than not caching. The 1-hour lifetime fixes that but costs $0.30 more in one sitting, so choose the lifetime from the gaps. GPT-6.1 Sol covers both patterns because each hit keeps its entry for 30 minutes, though in its default implicit mode every question would write the whole prompt, for $5.05 in all. On Gemini 3.8 Flash, the explicit cache’s guarantee costs about $0.12 more than implicit hits. On Gemini 3.1 Pro, a 200,000-token document plus a question is just over the 200K line, so the request is billed at $4 input, $0.40 cached and $18 output.6
What breaks a cache hit
Every provider here matches exact prefixes. These are the causes of misses that their docs describe:
- Changing content early in the prompt. A timestamp, request ID, user name or retrieved snippet placed before the cache point changes the prefix every time. On Claude, a changed tool definition invalidates everything, and Anthropic warns that Swift and Go can randomise JSON key order.1
- Settings rendered into the prompt. On Claude these include
tool_choice, images, thinking and effort settings, fast mode, and the web search and citations toggles.1 On OpenAI they include the model, tools,parallel_tool_calls, the output schema, reasoning effort and verbosity. To switch tools off for one request, OpenAI suggeststool_choice: "none"orallowed_toolsover removing definitions.3 - A cache point on content that changes, as in the first example.
- A prefix below the minimum. Anthropic and OpenAI both suggest padding a prefix that falls just short with useful, stable material. By OpenAI’s sums at 0.1x reads, over ten requests, padding any prefix of 221 tokens or more up to 1,024 costs less than leaving it uncached.3
- Timing. A gap longer than the lifetime is a miss, and on Claude the gap is counted from the start of the previous request. Bursts miss too. On Claude, parallel requests sent before the first response begins each write, and on OpenAI, traffic above 15 requests per minute can overflow to machines without the entry.3
- Rewritten history. Summarising, compacting or truncating a conversation changes the prefix. On OpenAI, extending a message instead of appending a new one loses the earlier cache point. On Claude, adding 20 or more blocks since the last write puts it outside the lookback window. xAI says that leaving out earlier
reasoning_contentis the top cause of misses on its reasoning models.19 - Scope. Claude isolates caches per workspace, and OpenAI per organisation and processing region.
We have seen a low hit rate in our own work. In why our LLM pipeline reported 0 dropped, one build on Azure OpenAI served 19,712 of its 668,397 input tokens from the prompt cache. As that post put it:
Only 2.9% of input tokens came from the prompt cache.
It listed these common reasons for a low hit rate:
- The material shared between calls isn’t at the start of the prompt.
- The start of the prompt changes between calls, even by a timestamp or an ID.
- The prompts are shorter than 1,024 tokens.
- Calls that share a prefix are too far apart in time.
The 1,024-token minimum there is Azure OpenAI’s. For scale, OpenAI’s guide says example deployments of a single-turn judge and a multi-turn agent reported cache-hit rates of about 70% and above 90%. Those are vendor figures, offered as illustrations.3 The agent example above reaches 94% on paper.
Keeping a cache warm and measuring hits
On Claude, a request with max_tokens: 0 writes the cache and bills no output, and Anthropic says to repeat it at least every 5 minutes or to use the 1-hour lifetime.1 Each ping that hits is billed as a read. Bridging a quiet hour with a ping every 4 minutes takes 15 reads, while the 1-hour lifetime costs 0.75 times the prefix’s input price more than a 5-minute write. At 0.1x reads the pings cost 1.5 times, double the longer lifetime. At 0.05x, on Opus 5.5 and Sonnet 5.5, they cost the same, and at 0.025x on Fable 5.1 they cost half. Pings also need a scheduler and spend money when nobody is using the product, so the 1-hour lifetime is usually simpler.
OpenAI’s prompt_cache_options.prewarm does the same job at the write rate, and its 30-minute lifetime makes pings rare.3 Gemini’s explicit caches stay warm for as long as you pay for storage, and DeepSeek keeps unused entries for hours to days.
To measure hits, log the usage block of every response by model and kind of work.
| API | Read from cache | Written to cache | Total input |
|---|---|---|---|
| Claude Messages | cache_read_input_tokens |
cache_creation_input_tokens |
Read + written + input_tokens |
| OpenAI Responses | input_tokens_details.cached_tokens |
input_tokens_details.cache_write_tokens |
input_tokens |
| Gemini generateContent | cachedContentTokenCount |
Not reported | promptTokenCount |
| DeepSeek | prompt_cache_hit_tokens |
Not reported | Hit + prompt_cache_miss_tokens |
| xAI Chat Completions | prompt_tokens_details.cached_tokens |
Not reported | prompt_tokens |
Claude’s input_tokens counts only the tokens after the last cache point, so add all three fields. If both cache fields are zero, the prompt was probably under the minimum.1 Gemini’s promptTokenCount already includes the cached part.20 The hit rate is cached tokens divided by total input tokens.3 Track the written share as well, because writes that are never followed by reads mark a cache point on changing content. A sketch, written for this post:
def cache_split(provider: str, u: dict) -> tuple[int, int, int]:
"""Return (read, written, total) input tokens from one response's usage block."""
if provider == "anthropic":
read = u.get("cache_read_input_tokens") or 0
written = u.get("cache_creation_input_tokens") or 0
return read, written, read + written + u["input_tokens"]
if provider == "openai": # Responses API
d = u.get("input_tokens_details") or {}
return d.get("cached_tokens", 0), d.get("cache_write_tokens", 0), u["input_tokens"]
if provider == "gemini": # usageMetadata from generateContent
return u.get("cachedContentTokenCount", 0), 0, u["promptTokenCount"]
if provider == "deepseek":
hit = u["prompt_cache_hit_tokens"]
return hit, 0, hit + u["prompt_cache_miss_tokens"]
raise ValueError(f"unknown provider: {provider}")
For other ways to reduce LLM costs, such as model choice and effort settings, see our LLM API price comparison, which also prices a cached agent step on 13 models. What a coding agent costs per engineer shows cache reads and writes making up 80% of a sample Opus 5.5 session.
How we checked these numbers
- Prices and rules come from each provider’s documentation as of 15 October 2026. Because pricing pages change, we read Internet Archive copies from 15 October of Anthropic’s pricing and caching pages, OpenAI’s and Google’s pricing pages, DeepSeek’s caching guide and xAI’s pricing page. OpenAI’s caching guide is identical in copies from 13 and 17 October, and so are DeepSeek’s prices. Kimi K3’s prices come from a copy made late on 14 October.
- Last-updated dates. Google’s caching pages and API reference were last updated on 13 October, and its pricing page and Cloud caching overview on 15 October. xAI’s caching pages were last updated between March and October 2026.
- Release notes date Anthropic’s Sonnet 5.5 cache price cut to 7 October and Gemini 4 Argon’s general availability to 13 October.1415
- Worked examples are our arithmetic from list prices. They leave out reasoning tokens, batch discounts, data-residency charges, taxes and the hidden system tokens OpenAI adds. Gemini’s write price is an assumption based on Google Cloud’s documentation.
- Measurements. We didn’t run these workloads for this post. The one measured figure comes from a single build in our pipeline post.
- Scope. We didn’t cover Claude or Gemini on Bedrock, Google Cloud or Microsoft Foundry, or Azure OpenAI, whose minimums and fields can differ. Google Cloud, for example, lists a 6,144-token implicit minimum for Gemini 3.1 Pro Preview and 3.8 Flash.7
Prompt caching checklist
- Order the prompt from most to least stable, with tools, system instructions and reference documents first and the user’s message last.
- Keep timestamps, IDs, user names and retrieved snippets after the cache point.
- Serialise tools and JSON with a fixed key order, and don’t reorder tools between requests.
- On Claude and on OpenAI’s GPT-5.6 and later, put an explicit cache point at the end of the fixed prefix. Don’t leave single-turn prompts to automatic placement.
- Check each prefix against the model’s minimum, which is 512 tokens on current Claude models, 1,024 on OpenAI and 4,096 on current Gemini models.
- On Claude, keep the 5-minute lifetime for gaps under 5 minutes and use the 1-hour lifetime for gaps up to an hour.
- On Gemini, start with implicit caching, and pay for an explicit cache only when you need a guaranteed hit and expect enough uses each hour to cover its storage.
- Append to conversations instead of editing earlier turns. Change instructions on current Claude models with a system message inside
messages, and effort on GPT-6 models with aconfiguration_updateitem. - Log read, written and total input tokens for every call, and alert when the hit rate falls or the written share rises.
- Recheck prices monthly. Anthropic changed a cache price on 7 October, and Gemini 4 Argon’s prices first appeared on 13 October.
-
Anthropic, “Prompt caching”, Claude API docs, Internet Archive copy of 15 October 2026, https://web.archive.org/web/20261015084903/https://platform.claude.com/docs/en/build-with-claude/prompt-caching ↩↩↩↩↩↩↩↩
-
Anthropic, “Pricing”, Claude API docs, Internet Archive copy of 15 October 2026, https://web.archive.org/web/20261015103405/https://platform.claude.com/docs/en/about-claude/pricing ↩↩↩
-
OpenAI, “Prompt caching”, OpenAI API docs, Internet Archive copy of 13 October 2026, identical on 17 October, https://web.archive.org/web/20261013195532/https://developers.openai.com/api/docs/guides/prompt-caching ↩↩↩↩↩↩↩↩↩↩
-
OpenAI, “Pricing”, OpenAI API docs, Internet Archive copy of 15 October 2026, https://web.archive.org/web/20261015084552/https://developers.openai.com/api/docs/pricing ↩↩
-
Google, “Context caching” (generateContent API), Gemini API docs, last updated 13 October 2026, https://ai.google.dev/gemini-api/docs/generate-content/caching ↩↩↩↩
-
Google, “Gemini Developer API pricing”, Internet Archive copy of 15 October 2026, https://web.archive.org/web/20261015145814/https://ai.google.dev/gemini-api/docs/pricing ↩↩↩↩
-
Google Cloud, “Context caching overview”, Gemini Enterprise Agent Platform docs, last updated 15 October 2026, https://docs.cloud.google.com/gemini-enterprise-agent-platform/models/context-cache/context-cache-overview ↩↩↩
-
DeepSeek, “Context Caching”, DeepSeek API docs, Internet Archive copy of 15 October 2026, https://web.archive.org/web/20261015150205/https://api-docs.deepseek.com/guides/kv_cache ↩↩
-
DeepSeek, “Models & Pricing”, DeepSeek API docs, Internet Archive copy of 13 October 2026, https://web.archive.org/web/20261013084112/https://api-docs.deepseek.com/quick_start/pricing ↩↩
-
xAI, “Prompt Caching”, with its “Usage & Pricing”, “Maximizing Cache Hits” and “Best Practices & FAQ” pages, xAI docs, last updated between 16 March and 10 October 2026, https://docs.x.ai/developers/advanced-api-usage/prompt-caching ↩↩
-
xAI, “Pricing”, xAI docs, Internet Archive copy of 15 October 2026, https://web.archive.org/web/20261015103246/https://docs.x.ai/developers/pricing ↩↩
-
Moonshot AI, “Model Inference Pricing Explanation”, Kimi API docs, Internet Archive copy of 14 October 2026, https://web.archive.org/web/20261014232025/https://platform.kimi.ai/docs/pricing/chat ↩↩
-
Moonshot AI, “Best Practices for context caching”, Kimi API docs, Internet Archive copy of 28 September 2026, https://web.archive.org/web/20260928103116/https://platform.kimi.ai/docs/guide/context-caching ↩
-
Anthropic, “Claude Platform release notes”, entry for 7 October 2026, https://platform.claude.com/docs/en/release-notes/overview ↩↩
-
Google, “Gemini API release notes”, entry for 13 October 2026, https://ai.google.dev/gemini-api/docs/changelog ↩↩
-
OpenAI, “GPT-6.1 Sol”, model page, Internet Archive copy of 12 October 2026, https://web.archive.org/web/20261012112632/https://developers.openai.com/api/docs/models/gpt-6.1-sol ↩
-
Anthropic, “Cache diagnostics”, Claude API docs, out of beta since 23 September 2026, https://platform.claude.com/docs/en/build-with-claude/cache-diagnostics ↩
-
Google, “Context caching” (Interactions API), Gemini API docs, last updated 13 October 2026, https://ai.google.dev/gemini-api/docs/caching ↩
-
xAI, “What Breaks Caching”, xAI docs, Internet Archive copy of 27 September 2026, https://web.archive.org/web/20260927031234/https://docs.x.ai/developers/advanced-api-usage/prompt-caching/multi-turn ↩
-
Google, “Generating content”, Gemini API reference, UsageMetadata, last updated 13 October 2026, https://ai.google.dev/api/generate-content ↩
Frequently asked questions
How much does Claude prompt caching cost?
As of 15 October 2026, a write to Claude’s 5-minute cache costs 1.25 times the input price and a write to the 1-hour cache 2 times. Reads cost 0.025 times the input price on Claude Fable 5.1, 0.05 times on Opus 5.5 and Sonnet 5.5, and 0.1 times on other Claude models, so one read repays a 5-minute write.
Does OpenAI charge for prompt caching?
On GPT-5.6 and later, including the GPT-6 models, a cache write costs 1.25 times the input price and a read 0.1 times, or 0.05 times on GPT-6.1 Sol. Earlier models charge nothing to write. Caching is on by default, and on the newer models an entry stays usable for at least 30 minutes after its last use.
Is Gemini context caching free?
Implicit caching costs nothing to use and gives a discount whenever a request hits, without a guarantee. Explicit caching guarantees the discount but adds storage, $4.50 per million tokens per hour on Gemini 3.1 Pro and $0.50 on Gemini 3.8 Flash as of 15 October 2026. Gemini 4 Argon supports implicit caching only.
How long does a prompt cache last?
On Claude, 5 minutes by default or 1 hour at a higher write price, and each hit resets the clock. On OpenAI’s GPT-5.6 and later, at least 30 minutes after the last use. Gemini’s explicit caches last as long as you set, an hour by default, and DeepSeek usually clears unused entries within hours to days.
Why is my prompt cache hit rate so low?
The usual causes are a timestamp or ID near the start of the prompt, a prefix below the model’s minimum, calls too far apart for the cache lifetime, and a cache point placed on content that changes every request. In one of our builds, only 19,712 of 668,397 input tokens came from the cache.
How can I reduce LLM costs with prompt caching?
Put stable content first, mark the end of it as the cache point, keep anything that changes after it, and pick a cache lifetime that covers the gaps between requests. In our worked example, caching cut a 30-call agent task on Claude Sonnet 5.5 from $2.61 to $0.44.
Building something like this?
9io is a small team of senior engineers with a fractional CTO, and we work by the hour. Send us a note about your product. The reply comes from the person who'd do the work.