# Prompt cache TTLs compared: what a pause costs on Claude and GPT

- Link: https://100xfounder.com/prompt-cache-ttl-cost/
- Published: 2026-12-03T07:43:00+05:30
- Author: Ishaan Vardhan

[AI News](https://100xfounder.com/category/ai-news/)Ishaan VardhanDec 3, 202610 
min read

A pause in an AI coding session can cost 25 times more than a quick follow-up. On
Claude’s API the prompt cache lasts 5 minutes by default; on OpenAI’s GPT-5.6 and
later models it lasts at least 30 minutes; Gemini 4 keeps entries on a best-effort
basis for up to 24 hours. When the cache lapses, the next request pays to write 
your whole context again.

The question went mainstream on 1 December 2026, when a Hacker News thread comparing
Claude’s 5-minute cache with GPT’s 30-minute one passed 400 points, and one commenter
asked where to find each provider’s cache duration at all. This guide answers that
from each vendor’s own documentation, fetched on 2 December 2026, and works out 
what a pause costs in dollars.

## Key takeaways

 * **Claude API:** 5-minute cache by default, refreshed free on each hit; a 1-hour
   cache costs 2x the input price to write instead of 1.25x.
 * **OpenAI GPT-5.6 and later:** 30-minute minimum lifetime at 1.25x to write; a
   12-hour option in the Responses API costs 2.5x.
 * **Gemini 4:** implicit caching only, no write fee, 95% off cached input, but 
   no guaranteed lifetime.
 * **Claude Code** already uses a 1-hour cache for the main conversation on a Claude
   subscription within plan usage; API-key users get 5 minutes unless they change
   it.

## Prompt cache lifetimes compared: Claude, OpenAI and Gemini

Prompt cache lifetime is how long a provider keeps your reusable prompt prefix (
system prompt, tools, documents, history) ready to read at a discount.

  |  API |  Default lifetime |  Longer option |  Write price |  Read price |  
   |  Claude API |  5 minutes, refreshed on each hit |  1 hour |  1.25x input (5 min), 2x (1 hour) |  0.05x on Sonnet 5.5 and Opus 5.5; 0.025x on Fable 5.1 and 5.2; 0.1x on most others |  
 |  OpenAI GPT-5.6 and later |  30 minutes minimum |  12 hours (Responses API) |  1.25x (30 min), 2.5x (12 hours) |  0.1x on most; 0.05x on GPT-6.2 Astra, GPT-6.2 Sol, GPT-6.1 Sol and GPT-6.1 Terra |  
 |  Gemini 4 models |  Best effort, up to 24 hours |  None (implicit only) |  No write fee |  95% off input |

_Sources: Anthropic, OpenAI and Google API documentation, fetched 2 December 2026._

According to [Anthropic’s prompt caching documentation](https://platform.claude.com/docs/en/build-with-claude/prompt-caching),
the Claude cache has a 5-minute lifetime that is refreshed at no extra cost each
time the cached content is used; adding `"ttl": "1h"` to the `cache_control` block
buys an hour.

OpenAI’s prompt caching guide says that for GPT-5.6 and later, cache writes cost
1.25 times the uncached input rate for the default 30-minute lifetime, and the Responses
API offers a 12-hour minimum lifetime at 2.5 times. Older models such as GPT-5.5
have no separate write charge and use the older retention settings (in memory, or
up to 24 hours).

Google’s Gemini caching documentation says Gemini 4 models support only implicit
caching, with no storage or write fee. Each entry has a best-effort lifetime of 
up to 24 hours, and Google warns that eviction is not predictable.

## The clock starts when the request starts

Claude’s cache lifetime is measured from the start of the request that wrote or 
read the entry, not from the end of the response. Anthropic’s documentation gives
the example of a response that takes 4 minutes to stream: the next request has about
1 minute to start if it is to reuse the 5-minute cache.

That detail explains much of the frustration on Hacker News, where commenters noted
that a build or test run can take longer than 5 minutes on its own, so the window
closes before anyone reads the result.

On OpenAI, each read extends a 30-minute entry to at least 30 minutes after that
read; a 12-hour entry is not restarted by reads.

## What a pause costs: a worked example

A pause costs the difference between a cache read and a fresh cache write on everything
that was cached. To make it concrete, take a coding agent with 100,000 tokens of
cached context (instructions, tools, files and history) on two models with the same
list price.

 * **Claude Sonnet 5.5:** $2 per million input tokens, $2.50 for 5-minute writes,
   $4 for 1-hour writes, $0.10 for cache hits, per Anthropic’s pricing table.
 * **GPT-6.2 Sol:** $2 per million input tokens, $0.10 cached input, $2.50 for 30-
   minute writes and $5 for 12-hour writes up to 272,000 input tokens, per OpenAI’s
   pricing page.
 * **Gemini 4 Carbon:** $4 per million input tokens and $0.20 for cached input, 
   per Google’s pricing page. All fetched 2 December 2026.

  |  Pause since last request started |  Claude Sonnet 5.5, 5 min |  Claude Sonnet 5.5, 1 hour |  GPT-6.2 Sol, 30 min |  GPT-6.2 Sol, 12 hours |  
   |  4 minutes |  $0.01 |  $0.01 |  $0.01 |  $0.01 |  
 |  10 minutes |  $0.25 (rewrite) |  $0.01 |  $0.01 |  $0.01 |  
 |  45 minutes |  $0.25 (rewrite) |  $0.01 |  $0.25 (rewrite) |  $0.01 |  
 |  2 hours |  $0.25 (rewrite) |  $0.40 (rewrite) |  $0.25 (rewrite) |  $0.01 |

_Our arithmetic from vendor list prices, standard tier, 2 December 2026. Covers 
only the cached 100,000 tokens of the first request after the pause; new tokens 
and output are extra._

Each miss here costs $0.24 more than a hit, repeated for every developer, meeting
and long test run, and growing with the context. Past 272,000 input tokens, OpenAI
doubles its input and cache rates for the whole request, its pricing page says.

![Table of what a 4-minute, 10-minute, 45-minute and 2-hour pause costs on a 100,000-
token cached context for Claude Sonnet 5.5 and GPT-6.2 Sol](https://100xfounder.
com/wp-content/uploads/2026/12/table-of-what-a-4-minute-10-minute-45-minute-and-
2-hour-pause-costs-on-a-100000-1024x640.webp)

Cost of the first request after a pause, 100,000 cached tokens · Infographic by 
100xFounder

## When the 1-hour Claude cache pays for itself

The 1-hour Claude cache pays for itself when the misses it prevents cost more than
its higher price on every token you write, including the small writes an agent makes
each turn, not only the first one.

On Sonnet 5.5 the 1-hour write costs $1.50 more per million tokens than the 5-minute
write. Take an illustrative developer whose agent writes 500,000 new tokens a day
to the cache (for example, 100 turns adding 5,000 tokens each):

 * Extra write cost with the 1-hour cache: 500,000 × $1.50 per million = **$0.75
   a day**.
 * Saving if six pauses a day of 5 to 60 minutes stop being misses: 6 × $0.24 = **
   $1.44 a day**, so the 1-hour cache wins.
 * Saving with only two such pauses: 2 × $0.24 = **$0.48 a day**, so the 5-minute
   default is cheaper.

These are assumptions, not measurements; plug in your own counts. Anthropic’s advice
follows the same logic: stay on 5 minutes for prompts sent more often than every
5 minutes, and use 1 hour for prompts reused every 5 to 60 minutes, such as slow
side agents or chats where users reply slowly.

Both lifetimes can be mixed in one request, with 1-hour entries placed first: a 
stable system prompt and tools on 1 hour, session context on 5 minutes.

## When OpenAI’s 12-hour cache pays for itself

OpenAI’s 12-hour cache costs twice the 30-minute write price, so it needs more avoided
misses to break even. On GPT-6.2 Sol, upgrading a 100,000-token prefix from a 30-
minute to a 12-hour write costs an extra $0.25, while each avoided rewrite saves
$0.24. Roughly two gaps longer than 30 minutes within the 12 hours make it worthwhile.

OpenAI’s guide recommends the same split: a 12-hour breakpoint for material reused
all day at the start of the prompt, 30 minutes for session context. It also flags
two traps:

 * From GPT-6.2 onward, top-level `instructions` in the Responses API are billed
   at the uncached rate even on a cache hit; reusable instructions belong in the
   first developer message.
 * Cached states live on individual machines, and traffic above about 15 requests
   per minute for one prefix can be routed elsewhere and miss.

## Is Claude Code on a 1-hour cache?

Claude Code uses a 1-hour cache for the main conversation on a Claude subscription
within the plan’s included usage, according to the [Claude Code prompt caching documentation](https://code.claude.com/docs/en/prompt-caching).
Subagents, workflows, compaction and similar background requests get 5 minutes, 
apart from a small set of helper requests Anthropic sets server-side.

With an API key, a cloud provider, or once a subscriber draws on paid usage credits,
Claude Code drops the main conversation to 5 minutes. The documentation says users
can set the `promptCacheTtl` setting (or the `CLAUDE_CODE_PROMPT_CACHE_TTL` environment
variable) to `1h` for the main conversation, and `subagentPromptCacheTtl` for everything
else, from version 2.1.242. A commenter in the Hacker News thread who said they 
work at Anthropic made the same point: the thread’s numbers apply to API-billed 
traffic.

Claude Code’s cost documentation also describes a “Prompt cache (main)” line in 
the session summary with the cached share of input, the misses and whether the cache
is still warm: the quickest check before changing a setting. For a wider view of
what coding agents cost per seat, see our [comparison of $20 coding-agent plans](https://100xfounder.com/coding-agent-plan-limits/)
and [AI coding tool costs for a team](https://100xfounder.com/ai-coding-tools-team-cost/).

**Keep-alive pings** are the other option: Anthropic’s documentation describes sending
a pre-warm request at least every 5 minutes to keep the default cache warm. On the
100,000-token example, twelve pings an hour cost about $0.12 in cache reads, close
to the $0.15 extra of one 1-hour write, so pings only make sense for a short, known
gap. Google says pings don’t guarantee a hit on Gemini.

## How to check what you are paying

Each API reports cache use in its response; start there before changing any lifetime.

 * **Claude API:** `cache_creation_input_tokens` (writes) and `cache_read_input_tokens`(
   reads). If both are 0, nothing was cached, often because the prompt was under
   the minimum (512 tokens on Sonnet 5.5, Opus 5.5 and Fable 5.x).
 * **OpenAI:** `usage.input_tokens_details.cached_tokens` for reads and `cache_write_tokens`,
   split into 30-minute and 12-hour writes. The minimum cacheable prefix is 1,024
   tokens on GPT-5.6 and later.
 * **Gemini:** the cached token count in the usage metadata; caching starts at 4,096
   input tokens on Gemini 4.

On Reddit, a post in r/ClaudeAI on 2 December described a session with a 97.4% cache
hit rate that still wasted about $12 across 232 turns, and a post in r/ChatGPTCoding
on 1 December argued that multi-step agents lose most of their cache when the prompt
prefix changes between steps. Those are users’ reports, but they point at misses
and rewrites rather than the headline hit rate. For per-model list prices beyond
caching, see our [AI model API pricing comparison](https://100xfounder.com/ai-model-api-pricing/).

![Five-step checklist for deciding whether to pay for a longer prompt cache lifetime](
https://100xfounder.com/wp-content/uploads/2026/12/five-step-checklist-for-deciding-
whether-to-pay-for-a-longer-prompt-cache-lifeti-1024x640.webp)

Five checks before changing your cache lifetime · Infographic by 100xFounder

## Bottom line

Cache lifetime is now a pricing decision. Claude’s 5-minute default suits tight 
loops and punishes anyone who steps away; OpenAI’s 30 minutes is more forgiving;
Gemini 4 drops the write fee but promises nothing. Measure your gaps and written
tokens, give stable material the long lifetime, and check the usage fields afterwards.

## FAQ

### How long does Claude’s prompt cache last?

Five minutes by default, refreshed free on each use, according to Anthropic’s documentation
on 2 December 2026. A 1-hour lifetime (`"ttl": "1h"`) costs 2 times the input price
to write instead of 1.25 times. The clock starts with the request, so long responses
shorten the window.

### How long does OpenAI’s prompt cache last?

On GPT-5.6 and later, at least 30 minutes by default, at 1.25 times the input price
to write, according to OpenAI’s documentation on 2 December 2026. The Responses 
API also offers a 12-hour minimum at 2.5 times. Older models such as GPT-5.5 use
the earlier retention settings instead.

### Does Gemini charge for prompt caching?

No storage fee and no write surcharge, according to Google’s documentation on 2 
December 2026; Gemini 4 bills cached input at 95% off. Entries are best effort, 
last up to 24 hours and can be evicted early, so savings are not guaranteed.

### Is Claude Code on a 1-hour cache?

Yes for the main conversation on a Claude subscription within plan usage; subagents
get 5 minutes. With an API key, a cloud provider or paid usage credits the default
is 5 minutes, which `promptCacheTtl: "1h"` changes in Claude Code 2.1.242 or later.

### Does a coffee break re-bill my whole context?

On the Claude API’s default 5-minute cache, yes: the first request after the break
rewrites the cached context at 1.25 times the input price, $0.25 instead of $0.01
on a 100,000-token Sonnet 5.5 context. OpenAI’s 30-minute default covers most coffee
breaks, not lunch.

### When should I pay for a longer cache?

When the misses it prevents cost more than its higher price on all tokens you write.
In our illustrative Sonnet 5.5 example, six idle gaps a day made the 1-hour cache
cheaper; two did not.

## Sources

 1.  Anthropic, “Prompt caching” (Claude API documentation), fetched 2026-12-02. platform.
     claude.com
 2.  Anthropic, “Pricing” (Claude API documentation), fetched 2026-12-02. platform.
     claude.com
 3.  Anthropic, “Prompt caching” (Claude Code documentation), fetched 2026-12-02. code.
     claude.com
 4.  Anthropic, “Manage costs effectively” (Claude Code documentation), fetched 2026-
     12-02. code.claude.com
 5.  OpenAI, “Prompt caching” (API documentation), fetched 2026-12-02. developers.openai.
     com
 6.  OpenAI, “Pricing” (API documentation), fetched 2026-12-02. developers.openai.com
 7.  OpenAI, “GPT-6.2 Sol” (model page), fetched 2026-12-02. developers.openai.com
 8.  Google, “Context caching” (Gemini API documentation), fetched 2026-12-02. ai.google.
     dev
 9.  Google, “Gemini Developer API pricing”, fetched 2026-12-02. ai.google.dev
 10. Hacker News, “Claude 5-minute prompt cache vs GPT 30-minute cache: the cost of
     pauses”, 2026-12-01. news.ycombinator.com/item?id=50717029
 11. Reddit r/ClaudeAI, “A 97.4% prompt-cache hit rate hid $12 of waste in one 232-
     turn session”, 2026-12-02. reddit.com/r/ClaudeAI/comments/1yav4h9
 12. Reddit r/ChatGPTCoding, “Why multi-step coding agents bleed 90% of their prompt
     cache”, 2026-12-01. reddit.com/r/ChatGPTCoding/comments/1ya2y9l

## Related stories

[⌊A dark server rack with its glass door open and one server pulled out, next to an open cardboard box glowing from inside⌉⌊A dark server rack with its glass door open and one server pulled out, next to an open cardboard box glowing from inside⌉AI NewsAmazon releases Ergo, its first open-weights AI model, at $1 per 1MIshaan VardhanDec 2, 20266 min read](https://100xfounder.com/amazon-ergo-open-weights/)

[⌊A closed steel vault door set into a glowing violet-to-blue lattice wall⌉⌊A closed steel vault door set into a glowing violet-to-blue lattice wall⌉AI NewsAnthropic finds a theoretical quantum attack on ML-KEM and ML-DSAIshaan VardhanDec 1, 20266 min read](https://100xfounder.com/anthropic-lattice-cryptography/)

[⌊A small video studio setup on a dark desk with a camera on a tripod and a monitor showing an abstract presenter silhouette, beside tiles with the HeyGen and Synthesia logos⌉⌊A small video studio setup on a dark desk with a camera on a tripod and a monitor showing an abstract presenter silhouette, beside tiles with the HeyGen and Synthesia logos⌉AI NewsHeyGen vs Synthesia: AI avatar video prices and features comparedIshaan VardhanDec 1, 202610 min read](https://100xfounder.com/heygen-vs-synthesia/)

Share this[](https://wa.me/?text=Prompt%20cache%20TTLs%20compared%3A%20what%20a%20pause%20costs%20on%20Claude%20and%20GPT%20https%3A%2F%2F100xfounder.com%2Fprompt-cache-ttl-cost%2F%3Futm_source%3Dwhatsapp%26utm_medium%3Dshare%26utm_campaign%3Darticle-end)
[](https://x.com/intent/post?text=Prompt%20cache%20TTLs%20compared%3A%20what%20a%20pause%20costs%20on%20Claude%20and%20GPT&url=https%3A%2F%2F100xfounder.com%2Fprompt-cache-ttl-cost%2F%3Futm_source%3Dx%26utm_medium%3Dshare%26utm_campaign%3Darticle-end)
[](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2F100xfounder.com%2Fprompt-cache-ttl-cost%2F%3Futm_source%3Dlinkedin%26utm_medium%3Dshare%26utm_campaign%3Darticle-end)
[](https://t.me/share/url?url=https%3A%2F%2F100xfounder.com%2Fprompt-cache-ttl-cost%2F%3Futm_source%3Dtelegram%26utm_medium%3Dshare%26utm_campaign%3Darticle-end&text=Prompt%20cache%20TTLs%20compared%3A%20what%20a%20pause%20costs%20on%20Claude%20and%20GPT)

Sources (12)

 1.  [Anthropic](https://platform.claude.com/docs/en/build-with-claude/prompt-caching)
     2 Dec 20265-min/1-h TTL, multipliers, price table, clock from request start, mixing
     TTLs, pre-warm, minimums, usage fields
 2.  [Anthropic](https://platform.claude.com/docs/en/about-claude/pricing) 2 Dec 2026Model
     prices
 3.  [Anthropic (Claude Code docs)](https://code.claude.com/docs/en/prompt-caching)
     2 Dec 2026Claude Code TTL buckets and settings
 4.  [Anthropic (Claude Code docs)](https://code.claude.com/docs/en/costs) 2 Dec 2026Prompt
     cache (main) statistics line
 5.  [OpenAI](https://developers.openai.com/api/docs/guides/prompt-caching) 2 Dec 202630m/
     12h lifetimes, multipliers, refresh rules, older-model retention, instructions
     trap, 15 rpm routing, usage fields, 1,024 minimum
 6.  [OpenAI](https://developers.openai.com/api/docs/pricing) 2 Dec 2026GPT-6.2 Sol
     prices, 272K short-context threshold
 7.  [OpenAI](https://developers.openai.com/api/docs/models/gpt-6.2-sol) 2 Dec 202612h
     write $5, >272K doubles
 8.  [Google](https://ai.google.dev/gemini-api/docs/caching) 2 Dec 2026Implicit caching,
     95% discount, no fees, best-effort 24h, 4,096 minimum
 9.  [Google](https://ai.google.dev/gemini-api/docs/pricing) 2 Dec 2026Gemini 4 Carbon
     $4 input, $0.20 cached
 10. [Hacker News](https://news.ycombinator.com/item?id=50717029) 1 Dec 2026Demand,
     user questions, Anthropic staff comment
 11. [Reddit r/ClaudeAI](https://www.reddit.com/r/ClaudeAI/comments/1yav4h9/) 2 Dec
     2026User report of cache waste
 12. [Reddit r/ChatGPTCoding](https://www.reddit.com/r/ChatGPTCoding/comments/1ya2y9l/)
     1 Dec 2026User report of multi-step agent cache loss
