Prompt cache tracker
Master prompt caching economics across OpenAI and Anthropic.
See cache hit rates per tenant and per prompt template, the dollars each cache read saved, the premium each cache write cost, and which templates break their own cache.
| Template | Hit rate | Saved |
|---|---|---|
| support/answer-v7tenant: all | 91% | $2,184 |
| legal/contract-review-v3tenant: acme-legal | 84% | $1,402 |
| sales/call-notes-v2timestamp before system prompt | 22% | $96 |
| agent/planner-v11tool list order varies | 47% | $611 |
| hr/resume-screen-v4user name in first 200 tokens | 8% | $12 |
Financial impact
What your hit rate is worth, in dollars.
Pick a model and a monthly input volume, then drag the hit rate. On Anthropic, also set how many reads each cache write earns: writes cost more than plain input, so a cache that is written and rarely read can cost money.
Model
Monthly input tokens
Writes cost 1.25x input for the 5-minute cache.
- Without caching
- $1,500
- With caching
- $577
- Saved per month
- $923
- Input cost reduced
- 62%
- Uncached input$363
- Cache writes$109
- Cache reads$105
Claude Sonnet 4.5: input $3/M, cache read $0.3/M, cache write $3.75/M. Ceiling at 100% hits: 90% off input.
Optimization flags
One variable in the wrong place can zero your hit rate.
Provider caches match on an exact prefix. Put a timestamp or a user name at the top of the system prompt and every request starts with different tokens. PALM SOUQ finds the first varying position per template and flags it.
8% hit rateDynamic values first
messages = [
{"role": "system", "content":
f"Today is {now()}. You are helping {user.name} " # changes every call
f"at {tenant.name}.\n\n" + POLICY_HANDBOOK}, # 14k static tokens
{"role": "user", "content": question},
]89% hit rateStatic prefix first
messages = [
{"role": "system", "content": POLICY_HANDBOOK}, # static prefix first
{"role": "user", "content":
f"[context] date={now()} user={user.name} "
f"org={tenant.name}\n\n{question}"}, # dynamic part last
]Cache rates by model
Read discounts and write premiums, side by side.
List prices per 1M tokens from the PALM SOUQ price table, last full review June 2026. Anthropic charges a premium to write the 5-minute cache; OpenAI, Gemini and DeepSeek do not charge a write premium on implicit caching.
| Model | Provider | Input | Cache read | Cache write | Read discount |
|---|---|---|---|---|---|
| GPT-5 | OpenAI | $1.25 | $0.13 | none | 90% |
| GPT-4.1 | OpenAI | $2.00 | $0.50 | none | 75% |
| GPT-4.1 mini | OpenAI | $0.40 | $0.10 | none | 75% |
| GPT-4o | OpenAI | $2.50 | $1.25 | none | 50% |
| Claude Opus 4.5 | Anthropic | $5.00 | $0.50 | $6.25 | 90% |
| Claude Sonnet 4.5 | Anthropic | $3.00 | $0.30 | $3.75 | 90% |
| Claude Haiku 4.5 | Anthropic | $1.00 | $0.10 | $1.25 | 90% |
| Gemini 2.5 Pro | $1.25 | $0.31 | none | 75% | |
| Gemini 2.5 Flash | $0.30 | $0.075 | none | 75% | |
| DeepSeek V3.2 (chat) | DeepSeek | $0.28 | $0.028 | none | 90% |
Per tenant
Hit rate, reads, writes and dollars saved for every tenant, so a customer whose usage pattern defeats caching shows up as a margin risk.
Per template
Group by X-PalmSouq-Feature or template id to compare prompt versions and catch regressions when someone edits a system prompt.
Per provider
Normalised cache metrics across Anthropic, OpenAI, Gemini and DeepSeek, so routing decisions can include cache economics.
Cache tracker questions
How does PALM SOUQ know a token was cached?
From the provider's own usage fields: cache_read_input_tokens and cache_creation_input_tokens on Anthropic, prompt_tokens_details.cached_tokens on OpenAI, cachedContentTokenCount on Gemini and prompt_cache_hit_tokens on DeepSeek. Nothing is estimated from prompt text.
Who pays for a cache write when tenants share a system prompt?
By default the tenant whose request created the cache entry is charged the write, and every tenant is charged for its own reads. You can switch shared templates to amortised mode, which spreads write cost across all tenants that read that prefix in the window.
What counts as a template?
Send X-PalmSouq-Feature or a template id header and PALM SOUQ groups calls by it. Without one, the gateway groups by a hash of the first cacheable block, so you still get per-prefix hit rates.
Can PALM SOUQ rewrite my prompts to improve hit rates?
No. PALM SOUQ does not change prompt content. It flags templates where the cacheable prefix is broken, shows the position of the first varying token, and estimates the saving if it moved. The fix stays in your code.
Find out what your cache hit rate is really worth.
Route your agent traffic through PALM SOUQ in 2 minutes. Change one base URL, pass a tenant header, and every token is attributed and governed.
14-day free production trial · 100k requests included · no card required