CalcSays
CHATBOT SYSTEM PROMPT · PROMPT CACHING

Chatbot System Prompt Caching Savings

A typical chatbot with a large system prompt caches a ~3,000-token prefix and sees ~90% hits (tune everything below). Here's whether that beats the write premium — and by how much.

For engineers deciding whether prompt caching is worth turning on — models the read discount AND the write premium against your real hit rate, not the brochure's 90%.

Model prices from OpenRouter · updated 2026-07-13

01 Your setup

Model

Cache reads $0.2/M vs $2/M fresh · writes $2.5/M (1.25×)

02 Caching on vs off

Caching saves you $1,413/month at a 90% hit rate — 48% off the uncached bill.

Without caching
$2,940
every token at full price
With caching
$1,527
reads discounted, misses pay writes

Break-even hit rate: 22% · you're at 90%

03 Where the savings come from

Uncached baselineprefix + fresh + output, all at list price$2,940
Cache reads on hits90% of calls re-read the prefix at $0.2/M−$1,458
Write premium on misses10% of calls re-write at $2.5/M+$45.00
With caching$1,527
Tweet
Why a break-even?Cached reads are cheap, but every miss re-writes the prefix — at a premium on Anthropic-style pricing. Below the break-even hit rate the premiums outweigh the discounts and caching loses money. Fresh input and output never get discounted, and TTL expiry isn't modeled — treat the hit-rate slider as your effective rate.

04 Which models reward caching most

1. Claude Opus 4.7 (Fast)Anthropic · biggest saver$21,195/mo (48%)
2. Claude Opus 4Anthropic$10,598/mo (48%)
3. Claude Opus 4.1Anthropic$10,598/mo (48%)
4. GPT-5 ImageOpenAI$7,088/mo (64%)
5. Claude Fable 5Anthropic$7,065/mo (48%)
6. Claude Fable LatestAnthropic$7,065/mo (48%)
7. Claude Opus 4.8 (Fast)Anthropic$7,065/mo (48%)
8. o3 Deep ResearchOpenAI$6,075/mo (44%)
9. o1OpenAI$6,075/mo (29%)
10. GPT-5.4 Image 2OpenAI$4,860/mo (51%)

Top 10 of 315 models by absolute monthly savings at this workload; the 147models without published cache pricing rank last. Savings alone don't pick a model — quality on your task does.

📄 Get the full agent cost audit
A multi-page report on your exact setup: where cost spirals, how much context-trimming / state-resets / model-routing each saves, and which model+framework combo is cheapest at your real failure rate. Generated from your numbers.

Prices from OpenRouter, snapshot 2026-07-13, synced daily (incl. cache read/write rates where published). With-caching = hits × prefix × read + misses × prefix × write + fresh × input + output; write falls back to the input rate when no write charge exists. TTL expiry and partial-prefix invalidation are not modeled — real savings run somewhat below the best case. All math runs in your browser.

How the math works

Caching brochures quote the read discount ("90% off"), but the real ROI needs two more numbers: the write premium and your hit rate. Every cache miss re-writes the prefix — at a premium on Anthropic-style pricing, at plain input price on OpenAI-style pricing — so caching a 3,000-token prefix is a bet that enough calls land on a warm cache.

Claude Sonnet 5 bills cached reads at $0.2/M against $2/M fresh input, and charges $2.5/M to write a cache entry (1.25× the input rate).

The break-even hit rate is where the bet flips: h* = (write − input) ÷ (write − read). For this page's defaults that's 22% — below it, caching costs you money; above it, every extra hit is pure savings. At the default 90% hit rate the 3,000-token prefix saves $1,413 per month (48% off the uncached $2,940).

Only the prefix participates: fresh per-call input (400 tokens here) and output (300 tokens) always bill at full price. TTL expiry and partial-prefix invalidation aren't modeled — treat the hit-rate slider as your effective hit rate after those losses, and expect real savings a notch below the best case.

Prices sync daily from OpenRouter (168 of 315 models publish cache-read pricing; 53 publish a write premium). Every calculation runs in your browser with tested, open formulas — nothing is estimated by an AI.

Frequently asked questions

How much does prompt caching save caching for a chatbot with a large system prompt?

At this page's defaults — a 3,000-token cacheable prefix, 300,000 calls a month, 90% hit rate — caching turns an uncached $2,940/month into $1,527/month: $1,413 saved (48%). Tune every input above for your workload.

What hit rate do I need for caching to pay off?

The break-even is (write − input) ÷ (write − read). For Claude Sonnet 5 that's 22% — with a 5-minute TTL, roughly "more than one hit per cached prefix". Production systems with stable system prompts typically see 70–95% effective hit rates; sporadic traffic with short TTLs can fall under 30%.

Why does the cache write premium matter?

Anthropic-style caching charges ~1.25× the input rate to create a cache entry, so every miss costs MORE than not caching at all. High-churn workloads (long-tail users, TTL expiry between calls) can sit below break-even without noticing — teams turn caching on, see the brochure discount, and never check the write column on the bill. OpenAI-style automatic caching has no write charge, which is why its break-even is 0%.

Which models reward caching most?

At this exact workload the top savers right now are Claude Opus 4.7 (Fast) ($21,195/month saved), Claude Opus 4 ($10,598) and Claude Opus 4.1 ($10,598) — refreshed daily from live prices. Expensive models with cheap reads save the most in absolute dollars; 147 of the 315 models in our catalog publish no cache pricing at all and rank last.

What formula does this calculator use?

Without caching = calls × [(prefix + fresh) × input + output × output-rate]. With caching = calls × [hit-rate × prefix × read + (1 − hit-rate) × prefix × write + fresh × input + output × output-rate], where write falls back to the input rate when no write charge is published. Savings is the difference; break-even hit rate is (write − input) ÷ (write − read). TTL and partial invalidation are not modeled.

Are these cache prices current?

Prices sync daily from OpenRouter's public catalog (including input_cache_read and input_cache_write where published) and the page shows its snapshot date. If a sync fails, the last verified snapshot keeps serving. All math runs client-side with tested code.