Short answer
Claude is usually cheaper when you achieve frequent cache hits on large, stable prompts.
OpenAI is often safer and sometimes cheaper when traffic is sparse or cache reuse is uncertain. The result also depends heavily on the specific models’ base input prices—caching discounts cannot be compared independently of those prices.
Basic pricing mechanics
On commonly used
Claude models:
- Cache write: about 1.25× normal input price for a 5-minute cache
- Cache read: about 0.1× normal input price
- A 1-hour cache may have a substantially higher write price, often around 2×
- Caching is explicitly controlled with cache markers/breakpoints
On standard
OpenAI prompt caching:
- Cache write: 1× normal input price
- Cache read: commonly 0.5×
- Caching is automatic and applies to matching prompt prefixes
- Entries are generally retained for only several minutes after inactivity, though the exact behavior is model-dependent
Some newer OpenAI models offer much deeper cache-read discounts—potentially comparable to Claude’s—so the model-specific pricing page matters.
Break-even intuition
Using normalized prices and assuming a 5-minute Claude cache:
| Requests using the same cached context |
Claude |
OpenAI standard caching |
| Initial write + 1 hit |
1.35× base |
1.50× base |
| Initial write + 2 hits |
1.45× base |
2.00× base |
| Initial write + 9 hits |
2.15× base |
5.50× base |
Thus, Claude’s 90% cache-read discount generally wins after even a small amount of reuse, despite its 25% write surcharge. OpenAI’s lack of a write surcharge makes it more forgiving when the cache is created but never used again.
This comparison assumes the two models have the same uncached input price. If OpenAI’s underlying model is cheaper, it can still be cheaper in absolute dollars even with a smaller caching discount.
When Claude tends to win
Claude is generally more economical when:
- A large system prompt, tool specification, or document is reused many times
- Requests arrive in bursts within the cache TTL
- You cache substantial contexts, such as RAG documents or agent instructions
- You can place cache breakpoints around stable sections
- The workload has enough volume to amortize cache writes
For example, document QA, active multi-turn sessions, and agent loops often favor Claude because most of the cached tokens are charged at roughly 10% of the normal input rate.
When OpenAI tends to win
OpenAI can be cheaper or less risky when:
- Requests are sporadic and often separated beyond the cache lifetime
- You do not know whether a newly cached prompt will be reused
- You want caching with no special implementation
- Your prompt has a stable prefix naturally
- You are using an especially inexpensive OpenAI model
- The model offers a deeper cache discount than the standard 50% rate
OpenAI’s automatic caching also avoids paying Claude’s cache-write premium when a cache entry turns out to be a one-off.
Engineering considerations
The nominal discount is not the whole story:
- OpenAI caching is prefix-based. Dynamic content placed near the beginning—timestamps, user IDs, changing instructions, or reordered tools—can prevent a cache match.
- Claude provides more explicit control. You can mark stable prompt blocks and leave dynamic content outside them, but this requires more integration work.
- TTL matters. A 1-hour Claude cache can be valuable for intermittent traffic, but its higher write cost may negate that benefit unless the context is reused enough.
- Only matching cached tokens receive the discount. New conversation text, changing documents, and output tokens are billed separately.
- Model prices vary. Compare total cost using the actual model you intend to deploy, not just the cache-read percentage.
Practical verdict
- High reuse, large prompts, bursty traffic: Claude is often cheaper, sometimes substantially.
- Low or unpredictable reuse: OpenAI is often the safer economic choice because writes are not surcharged.
- Newer OpenAI models with approximately 90% cache-read discounts: The advantage may disappear; compare their base input prices and retention rules directly.
A useful budgeting formula is:
\[
\text{cached cost}
=
\text{write price}
+
(\text{number of cache hits} \times \text{read price})
\]
For a definitive production choice, estimate the expected number of hits per cache write and calculate that figure using the current prices for the exact Claude and OpenAI models.