Home / Blog / Pricing

Pricing

Claude Prompt Caching Pricing in 2026: What Cache Writes and Hits Cost, Model by Model

Claude prompt caching pricing, model by model: cache write and cache hit rates, 5-minute vs 1-hour caches, and a worked example of what caching saves.

6 min read

Caching rules, multipliers and minimum lengths checked Oct 23, 2026 in Anthropic’s prompt caching docs. Per-model rates checked Oct 18, 2026 and Batch rules Oct 19, 2026 on Claude API pricing. This page has no affiliate links (how we work).

The short version: on Claude, a cache hit costs a tenth of the normal input price or less, and on the newest models it’s a twentieth or a fortieth. Writing to the cache costs 1.25x input for a 5-minute cache, or 2x for a 1-hour cache. So caching pays the moment you reuse a prefix once inside the window. It loses money when the cache expires before anyone reads it. For base token rates on every model, see our Claude API pricing post. This page is only about caching.

We haven’t tested these rates on a real workload; the worked example is arithmetic on Anthropic’s published prices.

TL;DR: when caching pays

  • Pays: agents and chats that re-send the same long system prompt, tool list or codebase context every few minutes.
  • Pays big: Sonnet 5.5, Opus 5.5 and Fable 5.1, where hits cost 0.05x or 0.025x of input.
  • Doesn’t pay: one-off prompts, or traffic so sparse the 5-minute cache dies between requests.
  • Can’t happen: prompts under the model’s minimum length (512 to 4,096 tokens). They’re “processed without caching, and no error is returned.”
  • Comparing vendors or tools? See AI API pricing compared or AI coding tools compared.

How Claude prompt caching is billed

Three line items, per Anthropic’s caching docs (verified Oct 23, 2026):

  • Cache write, 5 minutes: 1.25x the base input price. This is the default.
  • Cache write, 1 hour: 2x base input. Optional, “at extra cost”.
  • Cache read (hit): 0.1x base input. Exceptions: Fable 5.1 and Mythos 5.1 reads are 0.025x, and Opus 5.5 and Sonnet 5.5 reads are 0.05x.

The 5-minute lifetime is “refreshed for no additional cost each time the cached content is used”, and it’s measured from the start of the request. So a busy cache stays alive for free; you still pay the hit rate on each read. Think of it as Leonard in Memento: the memory lasts five minutes, and only the tattoo you keep reading survives.

You get up to 4 cache breakpoints, with a 20-block lookback. Minimum cacheable prompt length is 512 tokens on the newest models (including Opus 5.5, Sonnet 5.5 and Haiku 5.5), 1,024 on Sonnet 5 and Sonnet 4.5/4.6, 2,048 on Opus 4.7, and 4,096 on Opus 4.5/4.6 and Haiku 4.5.

Caching prices by model

USD per million tokens.

ModelInput5m write1h writeCache hit
Fable 5.1$10$12.50$20$0.25
Opus 5.5$4$5$8$0.20
Sonnet 5.5$2$2.50$4$0.10
Sonnet 5$2$2.50$4$0.20
Haiku 5.5 ≤100K$0.10$0.125$0.20$0.01
Haiku 5.5 >100K$0.50$0.625$1$0.05

Source: Claude API pricing, verified Oct 18, 2026; the caching docs showed the same figures on Oct 23, 2026. Output prices are unchanged by caching. More tools: AI coding tools compared.

Older models are still listed in the caching docs (verified Oct 23, 2026): Opus 4.5 to 4.8 at $5 input, $6.25 5m write, $10 1h write, $0.50 hit; Sonnet 4.5/4.6 at $3, $3.75, $6, $0.30; Haiku 4.5 at $1, $1.25, $2, $0.10.

Sonnet 5 and Sonnet 5.5 cost the same to write, but a 5.5 hit is half the price. Worth a look if you cache heavily on Sonnet 5.

Worked example: a coding agent re-sending 50k tokens

The setup is an example, not a measurement: an agent on Sonnet 5.5 that re-sends the same 50,000-token context (system prompt, tools, repo files) on 20 requests, each within 5 minutes of the last. Output tokens are left out because caching doesn’t change them.

ScenarioMathInput cost
No caching20 × 50k × $2/M$2.00
5m cache, kept warm1 write ($0.125) + 19 hits × $0.005$0.22
5m cache, expires each time20 writes × $0.125$2.50

Kept warm, caching cuts that input bill by about 89%. Let it expire every time and you pay 25% more than not caching. A cache nobody reads is a tax.

When the 1-hour cache wins: same 50k context, but 6 requests spaced 10 minutes apart. No caching: 6 × $0.10 = $0.60. A 5-minute cache expires every time: 6 × $0.125 = $0.75. A 1-hour cache: one $0.20 write plus 5 hits at $0.005 = $0.225. Slow, human-paced sessions are what the 1-hour option is for, sort of like Netflix asking “Are you still watching?” before it gives up on you.

Break-even rule from the multipliers: a 5-minute write costs 0.25x extra, and any hit saves at least 0.9x, so one hit inside the window pays it back. A 1-hour write costs 1x extra, so you need two hits.

Does caching stack with Batch?

Yes. Anthropic’s Batch API is 50% off input and output and “stacks with prompt caching” (Claude API pricing, verified Oct 19, 2026). The caching docs say the multipliers “stack with… Batch API discount, long context pricing, and data residency” (verified Oct 23, 2026). Batch base rates: Opus 5.5 $2/$10, Sonnet 5.5 $1/$5, Haiku 5.5 (≤100K) $0.05/$0.25. By our arithmetic, a Sonnet 5.5 Batch cache hit works out to $0.05 per million tokens. One catch: Fast mode isn’t available with Batch.

Caching on OpenAI and Gemini

OpenAI lists cached input and cache writes per model: gpt-6.1-sol is $2.00 input, $0.10 cached, $2.50 cache writes. Google’s Gemini 3.8 Flash charges $0.075 for context caching through Dec 31, 2026, plus storage of $0.50 per million tokens per hour (both verified Oct 18, 2026). Full tables: OpenAI API pricing, Gemini API pricing, and AI API pricing compared.

Here’s what I’d do

Put everything static (system prompt, tool definitions, big reference files) at the front, mark a breakpoint after it, and check your traffic pattern before picking a TTL. Requests every minute or two: 5-minute cache. A human typing every 10 to 20 minutes: 1-hour cache. Nightly jobs: Batch plus caching. If you’re on a Claude subscription rather than the API, caching rates don’t apply to you; your constraint is Claude Code usage limits.

Running out of context rather than budget? Claude Code “Prompt is too long” covers the context-window errors in Claude Code.

FAQ

How much does Claude prompt caching cost? A 5-minute cache write is 1.25x base input, a 1-hour write is 2x, and a hit is 0.1x or less, e.g. $2.50 write and $0.10 hit per MTok on Sonnet 5.5.

How long does the Claude prompt cache last? Five minutes by default, refreshed free each time it’s used, or one hour if you pay the 2x write price.

Is a Claude cache hit free? No, a hit costs 0.1x base input on most models, 0.05x on Opus 5.5 and Sonnet 5.5, and 0.025x on Fable 5.1 and Mythos 5.1.

Does Claude Code use prompt caching? On Pro and Max, Claude Code draws on plan usage limits rather than per-token billing, so cache rates only matter if you run it with an API key.

Sources

  1. Claude prompt caching docs: https://platform.claude.com/docs/en/build-with-claude/prompt-caching (verified 2026-10-23)
  2. Claude API pricing, caching rates: https://platform.claude.com/docs/en/about-claude/pricing (verified 2026-10-18)
  3. Claude API pricing, Batch: https://platform.claude.com/docs/en/about-claude/pricing (verified 2026-10-19)
  4. OpenAI API pricing: https://developers.openai.com/api/docs/pricing (verified 2026-10-18)
  5. Gemini API pricing: https://ai.google.dev/gemini-api/docs/pricing (verified 2026-10-18)
  6. Claude Code with Pro or Max (subscription usage limits): https://support.claude.com/en/articles/11145838-use-claude-code-with-your-pro-or-max-plan (verified 2026-10-23)

Related reading