Skip to content
Comparisons11 min read

Prompt Caching Compared: Anthropic vs OpenAI vs Bedrock

Md Badsha
Platform Engineer
15 Oct 2026
On this page
Prompt Caching Compared: Anthropic vs OpenAI vs Bedrock

TL;DR: Prompt caching is now ~90% off cached input on all three routes — Anthropic direct, OpenAI's GPT-5 family, and Claude via AWS Bedrock. The real differences are structural: Anthropic charges a write premium (needs at least 2 reuses in its 5-minute TTL to break even), OpenAI is fully automatic with no code changes, and Bedrock mirrors Anthropic's prices but demands a 4,096-token minimum. All figures below use prices checked 15 October 2026.

Every major LLM provider now discounts repeated prompt prefixes — but they built the discount three different ways. Anthropic wants explicit cache markers and charges you to write the cache. OpenAI does it automatically and quietly, at a discount that depends on the model. AWS Bedrock gives you Anthropic's exact pricing through your AWS bill, with a higher minimum token floor and AWS's own billing quirks.

This post compares all three: the mechanics, the current prices, the TTLs and minimums that decide whether you actually qualify, and worked math showing what a typical coding-agent workload costs on each. If you haven't read the mechanics yet, start with Prompt Caching Explained; if you're deciding between caching and just using a cheaper model, see Prompt Caching vs Model Downgrade.

The three designs at a glance#

Anthropic (direct API)OpenAIAWS Bedrock (Claude models)
MechanismExplicit cache_control breakpoints you placeFully automatic prefix matchingExplicit cache points, like Anthropic
Cache read discount90–95% off input (model-dependent)50–90% off input (model-dependent)90% off, mirroring Anthropic
Cache write premium5-min: 1.25× input; 1-hour: 2× inputNoneSame as Anthropic (1.25× / 2×)
Minimum prompt size1,024 tokens (Sonnet/Opus), 2,048 (Haiku)1,024 tokens4,096 tokens
Default TTL5 minutes; 1-hour option available~5–10 min inactivity (best-effort, up to ~1h); 24h retention option on newer models5 minutes; 1-hour option available
Code changes neededYes — add markersNoYes — add cache points

Mechanism details checked 15 October 2026 against provider docs and current engineering write-ups.

Anthropic: explicit, cheapest reads, charges to write#

Anthropic's design gives you control and the steepest read discounts, but you pay for the privilege up front. You mark sections of your prompt with cache_control, the first request processes them at a premium, and every later request with the same byte-identical prefix pays the read rate.

Current list prices, USD per million tokens, checked 15 October 2026:

ModelInputOutputCache write (5 min)Cache write (1 hour)Cache read
Claude Opus 5.5$4.00$20.00$5.00$8.00$0.20 (5%)
Claude Sonnet 5.5$2.00$10.00$2.50$4.00$0.10 (5%)
Claude Haiku 5.5 (prompts ≤ 100K)$0.10$0.50$0.125$0.20$0.01 (10%)
Claude Haiku 5.5 (prompts > 100K)$0.50$2.50$0.625$1.00$0.05 (10%)

Two October price moves are worth knowing. On 7 October 2026 Anthropic halved Sonnet 5.5 cache reads from $0.20 to $0.10 per million tokens, which it says cuts the cost of typical agentic work by around 20%. Claude Fable 5.1 and Mythos 5.1 get an even deeper 2.5% read rate; all other models sit at the standard 10%.

The write premium is the part people forget in their spreadsheets. Because of it, caching a prefix you only use once costs more than not caching at all (1.25× vs 1.0×). The break-even math, in units of the base input price for a prefix used N times:

  • 1 use (1 write, 0 reads): 1.25× vs 1.0× — caching loses.
  • 2 uses (1 write, 1 read): 1.25 + 0.10 = 1.35× vs 2.0× — caching saves ~33%.
  • 10 uses (1 write, 9 reads): 1.25 + 0.90 = 2.15× vs 10× — caching saves ~79%.

Rule of thumb: don't mark a prefix cacheable unless it will be reused at least twice inside the 5-minute window. For predictable but spaced-out traffic (one request every 20–30 minutes against the same prompt), the 1-hour TTL option with its 2× write premium can beat letting the 5-minute cache expire between requests.

OpenAI: automatic, zero code, discount depends on the model#

OpenAI's approach is the simplest of the three: any prompt of 1,024 tokens or more is eligible automatically. No markers, no SDK changes, no write premium. The first call is billed at the standard input rate; repeated prefixes get the discount. You can see what got cached in usage.prompt_tokens_details.cached_tokens (Chat Completions) or usage.input_tokens_details.cached_tokens (Responses API).

The catch is that the discount is model-dependent — the old "OpenAI gives 50%" shorthand is now wrong for new models:

Model familyCached-input discountExample
GPT-4o / o-series50% off—
GPT-4.175% off—
GPT-5 family90% offGPT-5.5: $5.00/M input → $0.50/M cached

Discount tiers checked 15 October 2026; GPT-5.5 list prices per current cost analyses.

A few mechanics worth knowing: requests are routed to machines by a hash of roughly the first 256 tokens, with an optional prompt_cache_key you can send to keep related traffic on the same machines; retention is roughly 5–10 minutes of inactivity, best-effort up to about an hour, with a prompt_cache_retention: "24h" option on newer models. Anything that changes the prefix — a timestamp, a request ID, non-deterministic tool JSON serialization — silently breaks the match and your hit rate drops to zero without any error.

AWS Bedrock: Anthropic's prices on your AWS bill#

Calling Claude through AWS Bedrock uses the same multiplier system as Anthropic's direct API — 1.25×/2× writes, 10% reads (or better on the models Anthropic discounts). Opus 5.5 on Bedrock lists $4.00 input / $20.00 output with $5.00 5-minute writes, $8.00 1-hour writes, and $0.20 reads per million tokens — identical to Anthropic's list.

Three Bedrock-specific differences matter:

  1. Higher minimum: 4,096 tokens. Anthropic's direct API starts caching at 1,024 tokens (Sonnet/Opus); Bedrock needs 4,096 before a cache point counts. Short system prompts that cache fine on the direct API won't cache at all on Bedrock.
  2. AWS billing surface. Charges flow through AWS (some models bill through AWS Marketplace, appearing under the provider rather than under Bedrock), which is a feature if your org already consolidates spend there and a complication if you're tracking per-model cost in two places.
  3. Same prefix discipline. Cache hits still need byte-identical prefixes inside the TTL — all the Anthropic marker hygiene applies.

If you're already on AWS and your prompts clear 4,096 tokens, Bedrock is the same caching deal with none of the write-up-to-a-new-vendor work. If your cacheable prefix is short, Anthropic direct wins on eligibility alone.

Worked example: the same agent workload on all three#

Assumptions, stated so you can rerun them with your numbers:

  • A coding agent with a 50,000-token stable context (system prompt + tool schemas + retrieved docs), 100 requests in one cache lifetime, all after the first hit the warm cache.
  • Sonnet 5.5 on Anthropic direct and on Bedrock; a GPT-5-class model ($5.00/M input, 90% cached discount) on OpenAI.
  • Output tokens excluded — caching never discounts output on any provider.
Line itemAnthropic direct (Sonnet 5.5)OpenAI (GPT-5 class)Bedrock (Sonnet 5.5)
Without caching100 × 0.05M × $2.00 = $10.00100 × 0.05M × $5.00 = $25.00100 × 0.05M × $2.00 = $10.00
Cache write0.05M × $2.50 = $0.1250.05M × $5.00 = $0.25 (no premium)0.05M × $2.50 = $0.125
Cache reads (99)99 × 0.05M × $0.10 = $0.49599 × 0.05M × $0.50 = $2.47599 × 0.05M × $0.10 = $0.495
With caching$0.62$2.73$0.62
Saving on cached prefix~94%~89%~94%

Arithmetic: $10.00 − $0.62 = $9.38/day saved on Anthropic/Bedrock; $25.00 − $2.73 = $22.27/day on OpenAI. Note the comparison is each provider against its own baseline — GPT-5-class input costs more to begin with, so the dollar savings differ while the percentage savings converge. The takeaway: with a warm cache and a genuinely stable prefix, all three routes cut the input bill for the cached portion by roughly nine-tenths. The differences show up at the margins — eligibility minimums, TTLs, and write premiums — not in the headline discount.

Which one should you pick?#

  • Steady high-volume traffic with a stable context (RAG apps, coding agents, support bots): all three win. Pick by your existing stack — Anthropic's explicit markers give you the most predictable hit rate; OpenAI needs no engineering; Bedrock keeps it on the AWS bill.
  • Short prompts (1K–4K tokens): Anthropic direct or OpenAI. Bedrock's 4,096-token floor excludes you.
  • Spaced-out but predictable traffic: Anthropic's 1-hour TTL option, or OpenAI's 24-hour retention on newer models. The 5-minute default TTL is the wrong tool here.
  • Legacy OpenAI models (GPT-4o): the 50% discount is real but modest — this is the one case where migrating the workload to a GPT-5-class model nearly doubles the caching discount while often costing less per token overall.

One more lever that stacks with all three: run your estimates through how to estimate your monthly token bill with the cached-input rates above, and put thinking-heavy cached workloads behind their own key with per-key spend caps — caching lowers the average bill, but a runaway loop still multiplies against the write price first. The full per-model price list lives in the catalog, and both provider-compatible endpoints are documented in the docs.

Prompt caching FAQ#

Which provider's prompt caching saves the most? With current pricing, the headline savings converge: ~90% off cached input on Anthropic (Sonnet/Opus class), 90% on OpenAI's GPT-5 family, and 90% on Claude via Bedrock. The deciding factors are structural: Anthropic charges a 1.25× write premium and needs at least 2 reuses in its 5-minute TTL to break even; OpenAI is automatic with no write fee; Bedrock mirrors Anthropic's prices but needs a 4,096-token minimum.

Do I need to change my code to get OpenAI's caching? No. OpenAI's prompt caching is automatic for prompts of 1,024 tokens or more — no markers or SDK changes. You can confirm it's working by checking usage.prompt_tokens_details.cached_tokens in the API response.

Why is my Anthropic cache hit rate near zero? Almost always one of three causes: something dynamic (a timestamp, request ID, or username) sits inside what you thought was the static prefix; tool definitions serialize non-deterministically between calls; or the cacheable prefix is under the 1,024-token minimum (2,048 for Haiku). All three fail silently — no error, just full-price input tokens.

Does Bedrock caching cost more than calling Anthropic directly? No — the multipliers are identical (1.25×/2× writes, 10% reads, with the same model-specific discounts). The differences are the 4,096-token minimum, AWS/Marketplace billing, and whatever your AWS agreement adds or removes.

Does prompt caching change model outputs? No. The cache stores intermediate computation for the prompt prefix, not generated tokens — the model samples normally with your temperature and top-p. Latency drops (typically 40–80% on cache-heavy prompts) because the prefix isn't recomputed.

List prices and mechanism details checked 15 October 2026. Promotional prices and provider defaults change; each maker's pricing page is the authority for list prices, and the model catalog for prices on Tokens.

Sources: Anthropic Sonnet 5.5 cache-read cut · Anthropic Opus 5.5 pricing · Claude Haiku 5.5 pricing breakdown · Claude Opus 5.5 on AWS Bedrock · OpenAI vs Anthropic caching mechanics · Anthropic vs OpenAI cost math · Azure OpenAI caching discounts · Prompt caching discount tiers · tokens.bd models · tokens.bd docs

Was this page helpful?

Still stuck? Open a support ticket

Use the coding models you already know, through one API

One key for OpenAI- and Anthropic-compatible tools. Pay in BDT or USD, and keep the coding agent you already use.

Create an account

Follow us for more articles