Short answer
Neither is universally cheaper. In practice:
- Claude is often cheaper for dense, high-hit-rate workloads, especially repeated large prompts within its 5-minute cache window.
OpenAI can be cheaper for sporadic traffic, particularly when cache misses do not incur a write premium, or when the chosen
OpenAI model has a lower base input price.
- The biggest factors are the specific models, cache-hit rate, request timing, and input/output-token mix—not just the advertised cache discount.
Pricing mechanics
Claude generally charges:
- Normal input price for uncached tokens
- 1.25× normal input price for a 5-minute cache write
- 2× for a 1-hour cache write
- About 0.1× normal input price for cache reads.[1]
OpenAI’s cached-input pricing is model-dependent. Many models price cached input at approximately 0.1× standard input, while some tiers are closer to 0.5×; cache-write treatment also varies by model and API configuration.[2] OpenAI caching is generally automatic, based on matching prompt prefixes, with retention depending on the model/API; current documentation describes options around a 30-minute TTL.[3]
Normalized example
Let the uncached cost of a reusable prompt prefix be \(B\).
For Claude’s 5-minute cache, with \(R\) subsequent cache hits:
\[
\text{cost} \approx 1.25B + 0.10BR
\]
Without caching:
\[
\text{cost} = B(1+R)
\]
After one cache hit, Claude costs \(1.35B\) instead of \(2B\), saving about 32.5%. With many hits, the savings approach 90%, after accounting for the initial write premium.
If OpenAI charges \(1.0B\) on a miss and \(0.1B\) per cached read, it is slightly cheaper than Claude on each cache cycle. If it charges \(0.5B\) per cached read, Claude becomes substantially cheaper after repeated hits. Thus, the conclusion changes with the OpenAI model’s cached-input rate.
When Claude tends to win
Claude is usually attractive when:
- Requests arrive frequently within five minutes.
- The reusable prefix is large.
- You have a high cache-hit rate.
- You can explicitly structure stable system instructions, tools, documents, or context for caching.
- You are comparing a lower-priced Claude model with a more expensive OpenAI model.
Claude’s explicit cache breakpoints can also be useful for layered prompts containing stable tools, documents, and changing conversation state.
When OpenAI tends to win
OpenAI may be cheaper or safer when:
- Requests are separated by more than Claude’s 5-minute default window.
- Cache misses are common.
- The selected OpenAI model has a lower base input price.
- Its model/API configuration does not charge a cache-write premium.
- You benefit from automatic prefix caching without having to manage cache breakpoints.[4]
Practical rule
For a repeated 100,000-token prefix:
- High-frequency agent loop: Claude often has the lower total input cost, provided its cache remains warm.
- Occasional requests: OpenAI may win because Claude’s cache-write premium can be paid repeatedly without enough reads to amortize it.
- Model-to-model comparison: Compare actual per-token prices first. A 90% discount on an expensive model can still cost more than a 90% discount on a cheaper one.
Finally, benchmark cost per completed task, including output tokens, reasoning tokens, tool calls, cache writes, and cache reads. Prompt caching only discounts repeated input; it does not necessarily dominate the total bill.