Prompt caching costs
Will prompt caching reduce your bill?
Compare no cache, 5-minute and 1-hour caching using your request pattern.
Anthropic direct API · Standard text, global routing · Rates checked 7 Nov 2026
Your request pattern
Start with this hypothetical example, then enter your own numbers.
Your monthly estimate
1,000 requests · same token volumes in every option
For this hypothetical schedule, it saves $30.20 versus no caching.
No cache
All input at the base rate
5-minute cache
1,000 writes · 0 reads
1-hour cache
100 writes · 900 reads
Ten-minute gaps expire the 5-minute cache; the 1-hour cache can retain the prefix. Actual hits depend on an identical eligible prefix being available.
See the cost breakdown
| Cost · USD | No cache | 5 minutes | 1 hour |
|---|---|---|---|
| Uncached input | $42.00 | $2.00 | $2.00 |
| Cache writes | $0.00 | $50.00 | $8.00 |
| Cache reads | $0.00 | $0.00 | $1.80 |
| Billed output | $5.00 | $5.00 | $5.00 |
After each write, at least 1 successful read saves money with 5-minute caching; 2 with 1-hour caching, compared with uncached input.
This estimate assumes a fixed prefix, equally spaced successful requests and a fresh cache at the start of each run. It models potential reuse, not measured cache hits. Taxes, tools, Batch, Fast mode, regional premiums and subscription allowances are outside this budget.
Why are my actual cache savings lower?
Check the usage before changing the lifetime
- Check whether you are reading or rewriting. In Claude API usage,
cache_read_input_tokenscounts reused input;cache_creation_input_tokenscounts writes. Thecache_creationbreakdown separates 5-minute and 1-hour writes. A large number of cached tokens alone does not show the bill. - Check the prefix and timing. These three models need at least 512 prefix tokens. Prefix changes, a different model, expiry or unavailable cache entries can prevent a hit. A successful reuse refreshes the lifetime; a longer lifetime also has a higher write rate.
- Reconcile the whole request. Total input is ordinary input plus cache-write and cache-read tokens. Count output and reasoning, repeated writes, retries and additional fees. Growing conversations or mixed cache breakpoints need their actual usage totals, rather than this fixed-prefix schedule.
For an application you use through a subscription or gateway, check that service’s billing and cache controls. This direct-API budget does not predict its allowance consumption. Official cache and usage documentation ↗
Compare three request patterns
Calculated examples use Sonnet 5.5, a 20,000-token prefix, 1,000 additional input tokens, 500 billed output tokens, 10 requests per cold run and 100 runs. Only the interval changes.
| Interval | No cache | 5 minutes | 1 hour | Lowest estimate |
|---|---|---|---|---|
| 1 min | $47.00 | $13.80 | $16.80 | 5-minute cache |
| 10 min | $47.00 | $57.00 | $16.80 | 1-hour cache |
| 60 min | $47.00 | $57.00 | $87.00 | No cache |
These are arithmetic scenarios, not a test of a client’s cache behavior. The lowest-cost lifetime changes when your spacing or number of cold starts changes.
Inspect prices, sources and calculation
Reviewed direct-API rates
USD per million tokens. Source observed 7 Nov 2026: Anthropic pricing ↗. These rates do not describe OpenRouter, NanoGPT or another gateway.
| Model / full input | Input | Output | Write 5m | Write 1h | Read |
|---|---|---|---|---|---|
| Claude Opus 5.5 | $4.00 | $20.00 | $5.00 | $8.00 | $0.20 |
| Claude Sonnet 5.5 | $2.00 | $10.00 | $2.50 | $4.00 | $0.10 |
| Claude Haiku 5.5 · up to 100K | $0.10 | $0.50 | $0.125 | $0.20 | $0.01 |
| Claude Haiku 5.5 · over 100K | $0.50 | $2.50 | $0.625 | $1.00 | $0.05 |
Haiku’s input tier uses the full request input, including the reusable prefix. Sonnet and Opus use the reviewed flat rates. This tool budgets up to 1M input plus output tokens per request and 128K billed output tokens.
How the estimate is calculated
For each cache option: ordinary input cost + write cost + read cost + output cost. Each independent run begins with a write. Further requests are reads when the interval is shorter than the lifetime; otherwise each writes again. At the lifetime boundary, this estimate assumes expiry. A prefix below 512 tokens stays uncached.
Input volume and billed output stay identical in all three options. Savings are the difference from the entire uncached bill, including output. A saving below zero means caching costs more. The read threshold compares one write followed by reads with the same number of uncached requests.
Cache rules and field definitions ↗ · Haiku context and output limits ↗