Skip to content
ProductFire

Claude Prompt Caching TTL: 5-Minute vs 1-Hour Cost

Claude prompt caching keeps a prompt prefix for 5 minutes by default, refreshed free each time it's used, or for 1 hour if you pay double to write it. Our math shows when each option saves money, when caching costs more than it saves, and how Claude compares with OpenAI and Amazon Ergo.

Published 7 min read

Rows of server racks in a data center beside the headline "Claude prompt caching: 5 minutes or 1 hour?"
Prompt caching keeps processed prompts on the provider's servers for a set time. Photo: Carl Lender / Wikimedia Commons, CC BY 2.0. Cropped, graphic by ProductFire.

Key takeaways

  • Claude's prompt cache lasts 5 minutes by default, and every cache hit restarts that 5-minute timer at no extra charge.
  • A 1-hour cache is available by adding "ttl": "1h"; writing to it costs 2x the normal input price, against 1.25x for the 5-minute cache.
  • Cache hits cost 0.1x the input price on most Claude models, and 0.05x on Opus 5.5 and Sonnet 5.5.
  • By our math, the 5-minute cache pays off after a single reuse, while the 1-hour cache needs two hits before it beats sending the prompt uncached.
  • OpenAI's newest models default to a 30-minute cache, with a 12-hour option at 2.5x; Amazon Ergo on Bedrock uses a 30-minute TTL.

You send Claude the same 50,000-token manual with every question. The first call is full price. The second, two minutes later, can cost one-twentieth as much for that manual, if it's still in the cache.

That's what prompt caching does, and the TTL, or time to live, decides whether it works. Claude keeps a cached prompt for 5 minutes by default and restarts the clock each time you use it. You can pay double to write a 1-hour cache instead. Pick wrong and caching costs more than it saves.

Claude prompt caching at a glance 5-minute cache (default) 1-hour cache
How to turn it on "cache_control": {"type": "ephemeral"} Add "ttl": "1h"
Write cost 1.25x input price 2x input price
Read (hit) cost 0.1x input (0.05x on Opus 5.5 and Sonnet 5.5) Same
Timer resets on a hit Yes, free Yes
Best for Calls more often than every 5 minutes Gaps of 5 to 60 minutes

Source: Anthropic prompt caching docs, read Dec. 2, 2026.

What is Claude prompt caching TTL?

TTL is how long Claude keeps a cached prompt prefix before deleting it. The default is 5 minutes, and each request that reads the cached content restarts that 5-minute lifetime at no extra cost. If 5 minutes is too short, you can set a 1-hour TTL, which costs more to write but survives longer gaps between requests.

The cache stores everything up to a breakpoint you mark with cache_control: usually your system prompt, tool definitions and any long documents. Anything after the breakpoint, such as the user's new question, is billed normally.

One rule catches people out: a cache hit needs the prefix to be 100% identical, including text and images. Change one character in a cached system prompt and you're writing a new entry, at the higher write price, on the next call. That's why stable content goes first and anything that varies goes last.

How much does Claude prompt caching cost?

Writing to the 5-minute cache costs 1.25 times the model's input price; the 1-hour cache costs 2 times. Reading costs 0.1 times the input price on most models, and 0.05 times on Claude Opus 5.5 and Sonnet 5.5. On Opus 5.5, that's $5 or $8 to write and $0.20 to read, per million tokens.

Bar chart of Claude Opus 5.5 prices per million tokens: $4 normal input, $5 five-minute cache write, $8 one-hour cache write, $0.20 cache read Chart: ProductFire, from Anthropic's prompt caching price table, read Dec. 2, 2026.

Model Input 5-min write 1-hour write Cache read
Claude Fable 5.2 $8 $10 $16 $0.20
Claude Opus 5.5 $4 $5 $8 $0.20
Claude Sonnet 5.5 $2 $2.50 $4 $0.10
Claude Haiku 5.5 (prompts up to 100k tokens) $0.10 $0.125 $0.20 $0.01

Prices per million tokens. Source: Anthropic docs. Fable 5.2 and Mythos 5.2 cache reads are priced at 0.025x input.

Output tokens aren't affected. Breakpoints themselves are free; you can set up to four, and you only pay for what's actually written and read.

The multipliers stack with Anthropic's other pricing modifiers, including the Batch API discount, long-context pricing and data residency, so a batch job with a cached prefix gets both discounts. There's a second benefit that doesn't show on the invoice: Anthropic says cache hits aren't deducted against your rate limit, so heavy caching lets you push more requests through the same tier.

When does the 1-hour cache pay off?

When your gaps are longer than 5 minutes but shorter than an hour, and you reuse the prompt at least twice in that hour. By our math, the 5-minute cache beats no caching after one reuse. The 1-hour cache costs 2x to write, so it needs two hits to come out ahead.

Our math: we priced a 50,000-token prompt on Claude Opus 5.5 under three usage patterns, counting input tokens only.

Three bar charts comparing no cache, 5-minute cache and 1-hour cache for a 50,000-token prompt: 30 calls 2 minutes apart cost $6.00, $0.54 and $0.69; 6 calls 10 minutes apart cost $1.20, $1.50 and $0.45; 2 calls 90 minutes apart cost $0.40, $0.50 and $0.80 Chart: ProductFire calculation from Anthropic's Dec. 2026 Opus 5.5 prices. Free to use with a link to ProductFire.

Pattern (one hour) No cache 5-minute cache 1-hour cache
30 calls, 2 minutes apart $6.00 $0.54 $0.69
6 calls, 10 minutes apart $1.20 $1.50 $0.45
2 calls, 90 minutes apart $0.40 $0.50 $0.80

The middle row is the trap. With 10-minute gaps, the 5-minute cache expires before every call, so you pay the 1.25x write six times and never get a hit. That's 25% more than not caching at all. Switch that workload to the 1-hour TTL and the bill drops by almost two-thirds.

The last row shows the other trap: if calls are more than an hour apart, every cache option loses money. Turn caching off for that prompt.

Anthropic's own guidance matches the math: stay on the 5-minute cache if you send a prompt more often than every 5 minutes, because hits keep refreshing it for free. Use 1 hour for chat users who pause, or agent steps that run longer than 5 minutes.

How do you turn on the 1-hour cache?

Add "ttl": "1h" to the cache_control object on the block you want cached. Without it, cache_control with type "ephemeral" uses the 5-minute default. You can also put cache_control at the top level of the request for automatic caching, which moves the breakpoint forward as a conversation grows.

Code block of a Claude Messages API request with cache_control type ephemeral and ttl 1h on a long system prompt Graphic: ProductFire example request, based on the fields in Anthropic's prompt caching docs.

You can mix both lifetimes in one request, with one rule: 1-hour entries must come before 5-minute entries. A common setup is a 1-hour breakpoint on a stable system prompt and documents, then a 5-minute breakpoint on the growing conversation.

To check it worked, read the usage block in the response. cache_creation_input_tokens shows what was written; cache_read_input_tokens shows what was served from cache.

Why isn't my prompt being cached?

The usual reasons are a prompt below the model's minimum length, a change somewhere before the breakpoint, or an expired cache. Current models such as Opus 5.5 need at least 512 tokens; some older models need up to 4,096. Short prompts are processed without caching and without any error, so check the usage fields.

Cards listing minimum cacheable prompt lengths: 512 tokens for current models such as Opus 5.5, 1,024 for Opus 4.8 and Sonnet 5, 2,048 for Opus 4.7, 4,096 for Opus 4.6 and Haiku 4.5 Graphic: ProductFire, from Anthropic's prompt caching docs (Claude API).

The quiet killer is a timestamp. If your system prompt includes the current time or a request ID before the breakpoint, the prefix changes on every call, and you pay for a fresh write every time without a single read. Move anything that changes after the breakpoint.

Concurrency is the other gotcha. If you fan out ten requests at once with the same new prefix, all ten pay to write, because the entry isn't usable until the first response starts. Send one request first, wait for it to begin streaming, then send the rest.

Long conversations have their own limit. The system looks back at most 20 blocks from a breakpoint for an earlier cache entry, so a long agent loop can outrun it. Anthropic suggests adding a second breakpoint earlier in the conversation.

On Amazon Bedrock, automatic caching isn't available, so you need explicit breakpoints, and Bedrock sets its own minimums.

How does Claude's cache compare with OpenAI and Ergo?

Claude's default is the shortest. OpenAI's GPT-5.6 and newer models default to a 30-minute minimum lifetime with writes at 1.25x, and offer 12 hours at 2.5x. Amazon Ergo on Bedrock uses a 30-minute TTL, with writes at $1.25 and reads at $0.03 per million tokens. Claude offers 5 minutes, or 1 hour at 2x.

Cards comparing cache lifetimes: Claude 5 minutes default and 1 hour option, OpenAI 30 minutes default and 12 hours option, Amazon Ergo 30 minutes Graphic: ProductFire, from Anthropic and OpenAI docs and the Amazon Bedrock model card, read Dec. 2, 2026.

Platform Default TTL Longer option Write cost Read discount
Claude 5 minutes 1 hour 1.25x / 2x 90% (95% on Opus 5.5, Sonnet 5.5)
OpenAI (GPT-5.6+) 30 minutes 12 hours 1.25x / 2.5x Up to 95%
Amazon Ergo (Bedrock) 30 minutes None listed $1.25 per M $0.03 per M

Analysis: The 5-minute default is the sore point for developers. For a chatbot where users reply in 6 to 20 minutes, OpenAI's default cache survives and Claude's doesn't, unless you remember to set 1 hour. But Claude's free refresh on every hit means a busy agent loop can keep a cache alive indefinitely at the cheapest rate. Neither is better in general; the right TTL depends on your gaps. If cost is your main concern, our guide to Amazon Ergo covers a much cheaper model with a longer default cache.

Does caching help RAG apps and agents?

Yes, if the same context repeats. A support bot that sends the same product manual every time is the ideal case. Retrieval apps that fetch different documents per question cache less, because the documents change; you can still cache the system prompt and tool definitions in front of them. Agents benefit most, since every step resends the growing conversation.

That's also a design question: if you're deciding between putting knowledge in the prompt or training it in, our explainer on RAG vs fine-tuning walks through the trade-offs. Caching doesn't fix wrong answers either; long prompts still need checking, as our piece on why AI chatbots hallucinate explains.

Video: IBM Technology's official YouTube channel. A general explainer of how prompt caching works.

What should you do: our recommendation

Start with the 5-minute cache on any prompt over the minimum that you send more than once every 5 minutes. Look at your logs: if most gaps between calls are 5 to 60 minutes, switch that breakpoint to "ttl": "1h". If calls are hours apart, don't cache. Then check cache_read_input_tokens for a day; if it's zero, something before your breakpoint is changing. Recheck after any model switch, because minimum lengths and read prices differ by model. More developer guides are on our AI hub.

Frequently asked questions

How long does Claude's prompt cache last?

Five minutes by default. Each time the cached content is used, the 5-minute lifetime restarts at no extra cost. You can set a 1-hour lifetime instead with "ttl": "1h" in cache_control.

How much does Claude prompt caching cost?

Writing to the 5-minute cache costs 1.25 times the model's input price; the 1-hour cache costs 2 times. Reading from the cache costs 0.1 times the input price on most models, and 0.05 times on Claude Opus 5.5 and Sonnet 5.5.

When should I use the 1-hour cache?

When the same long prompt is reused less often than every 5 minutes but more often than every hour, such as a user who pauses between messages or an agent step that runs longer than 5 minutes. Anthropic recommends staying on the 5-minute cache if you send the prompt more often than every 5 minutes.

Why isn't my Claude prompt being cached?

Usually the prompt is under the model's minimum (512 tokens for Opus 5.5 and other current models, up to 4,096 for some older ones), something before the breakpoint changed, or the cache expired. Check cache_creation_input_tokens and cache_read_input_tokens in the response.

Is Claude's cache shorter than OpenAI's?

By default, yes. Claude defaults to 5 minutes; OpenAI's GPT-5.6 and later models default to at least 30 minutes, with a 12-hour option. Claude's 1-hour option costs 2x to write; OpenAI's 12-hour option costs 2.5x.

Does caching change Claude's answers?

No. Caching stores the processed prompt prefix so it doesn't have to be processed again. It affects cost and speed; Anthropic says both cache lifetimes behave the same for latency.

Sources

  1. Anthropic, "Prompt caching," Claude Platform Docs, read Dec. 2, 2026
  2. OpenAI, "Prompt caching," API docs, read Dec. 2, 2026
  3. ProductFire, "How to use Amazon Ergo" (Bedrock cache pricing from the model card)
  4. Anthropic, "Building effective agents"
  5. IBM Technology, "What is Prompt Caching?" (video)
  6. Wikimedia Commons: Datacenter Server Racks (22370909788).jpg (Carl Lender, CC BY 2.0)

Spotted a mistake? Read our corrections policy or tell us.

Comments (0)

No login needed. Your name and comment are public.

0/1000

No comments yet. Be the first to share your view.

Keep reading

The ProductFire Brief

Get explainers like this every week

Free, one email a week. Unsubscribe anytime.

  1. Company RevenueBroadcom Earnings Dec. 9: AI Revenue and What to Watch
  2. GamingGame Awards 2026 Predictions: Who Will Win Game of the Year?
  3. TechWhatsApp iOS Update Required: Which iPhones Must Update
  4. AIAnthropic Delays Next Model: What Changes for Claude Users
  5. EntrepreneurshipEtched Founders: Who Built the $40B AI Chip Startup