AnalysisNov 12, 20268 min read9 sources

Prompt caching at Anthropic, OpenAI and Google: how it is billed and how to hit the cache

In one minute

Prompt caching reuses a stable prompt prefix so later requests pay a discounted cache-read rate instead of full input. Anthropic is opt-in via cachecontrol (automatic top-level or up to 4 explicit block breakpoints); default TTL 5 minutes (optional 1h); writes cost 1.25x/2x base input and reads usua

lly 0.1x (0.05x on Opus/Sonnet 5.5, 0.025x on Fable/Mythos 5.1). OpenAI is on by default; GPT-5.6+ add explicit promptcachebreakpoint and ttl 30m/12h with writes at 1.25x/2.5x and reads at 0.1x (0.05x on GPT-6.1 Sol/Terra). Google Gemini has default implicit caching plus explicit CachedContent objects on Gemini 3/2.5 (not Gemini 4 Argon+); cached tokens are billed at the published Context caching price (about 0.1x input on current models) and explicit caches also bill hourly storage. Order static tools/system/context first and put changing user text after the breakpoint. OpenRouter sticky-routes cache traffic and passes Anthropic-style cachecontrol or OpenAI promptcachebreakpoint through to providers.

*Field guide compiled 2026-11-06 from the official documentation, pricing pages and changelogs linked below; every line links to the page that states it.*

What it does

  • Anthropic automatic vs explicit prompt caching. Automatic: top-level cachecontrol applies a breakpoint to the last cacheable block and advances as conversations grow. Explicit: place cachecontrol on individual content blocks (up to 4 breakpoints). Both use the same infrastructure, pricing, and minimums. Managed Agents always have caching on. How: Automatic: add "cachecontrol": {"type": "ephemeral"} (optional "ttl": "1h") at the request root. Explicit: set cachecontrol on the last stable tools/system/message block. source
  • Anthropic cache breakpoints and prompt order. Cache prefixes follow tools → system → messages. Writes occur only at your breakpoint; reads look backward up to 20 blocks for a prior write. Place cachecontrol on the last block whose prefix is identical across requests—not on a per-request timestamp or user message—or you pay writes and never get hits. How: Put static tools, system, and large context first; mark the end of that static prefix; append the changing user turn after the breakpoint. source
  • Anthropic minimum cacheable tokens and TTL. Minimums (Claude API and listed platforms): 512 tokens for Fable/Mythos 5.1, Opus 5.5/5, Sonnet 5.5, Fable/Mythos 5, Haiku 5.5; 1,024 for Opus 4.8, Sonnet 5/4.6/4.5/4, Opus 4.1/4; 2,048 for Mythos Preview and Opus 4.7; 4,096 for Opus 4.6/4.5 and Haiku 4.5. Shorter prompts are processed without caching and no error. Default ephemeral TTL is 5 minutes (refreshed on hit); optional ttl "1h". Lifetime starts at the start of the request that writes/reads. source
  • Anthropic cache invalidation. Exact match required for the cached prefix. Changing tool definitions invalidates tools+system+messages. Web search/citations toggles and speed setting invalidate system+messages. toolchoice, images, thinking parameters, and effort typically invalidate message cache (model-specific for tools/system). Cache is workspace-isolated on the Claude API. source
  • OpenAI prompt caching (automatic and explicit). Enabled by default for supported models. GPT-5.6 and later support implicit mode (OpenAI places a breakpoint at the end of the latest eligible message) and explicit mode via promptcacheoptions.mode="explicit" plus promptcachebreakpoint on content blocks (up to four writes per request). Earlier models are implicit-only. Agents API uses the same caching behavior as Responses. How: Keep the rendered prefix identical. For GPT-5.6+: set promptcacheoptions and optional promptcachebreakpoint on inputtext/text blocks; place stable developer instructions in a developer message content block (top-level instructions cannot hold an explicit breakpoint). source
  • Google Gemini implicit context caching. Implicit caching is enabled by default for Gemini 2.5 and newer. No configuration required; cache-hit savings appear in usage.totalcachedtokens. Minimum input tokens: Gemini 4 Argon / 3.8 Flash / 3.6 Flash / 3.1 Pro Preview = 4,096; Gemini 2.5 Flash / 2.5 Pro = 2,048. Interactions API supports only implicit caching. Gemini 4 Argon and later do not support explicit caching. How: Put large, common contents at the beginning of the prompt and send similar prefixes close together in time. On Gemini 4 multi-turn/agent loops, the full previous request is cached only if the new request adds at least 2,050 tokens. source
  • Google Gemini explicit CachedContent. Explicit caching creates a CachedContent resource (POST /v1beta/cachedContents) bound to one model, with optional ttl/expireTime, systemInstruction, and contents. Only expiration is updatable. Reference via cachedContent name in generateContent. Mins: Gemini 2.5 Flash/Flash-Lite 1024 tokens; 2.5 Pro and Gemini 3+/Argon 4096 (Google docs). Storage billed hourly while the cache exists. How: Create cachedContents with model + contents (+ ttl), then pass the returned cachedContents/{id} into subsequent requests; delete when done. source

Modes

  • Anthropic automatic caching. Top-level cachecontrol; breakpoint moves to last cacheable block each turn. Compatible with block-level breakpoints but uses one of the 4 slots. Not available on legacy Amazon Bedrock (Opus 4.6 and earlier) top-level field. source
  • Anthropic explicit breakpoints. Up to 4 cachecontrol markers on tools/system/messages for sections that change at different rates or to keep a write inside the 20-block lookback window. source
  • OpenAI implicit vs explicit (GPT-5.6+). implicit: OpenAI places breakpoint at end of latest eligible message. explicit: only developer-selected promptcachebreakpoint locations participate; with no breakpoints, no caching and no write charge—useful for one-off prompts ≥1024 tokens that would otherwise pay 1.25x. source
  • Google implicit vs explicit. Implicit: default, automatic savings, no storage fee on Developer API Argon line / Agent Platform. Explicit: create/manage CachedContent (Gemini 3/2.5); default TTL 60 minutes on Agent Platform; storage billed hourly on models that list a storage price. source

Pricing and limits

  • Anthropic prompt caching multipliers (all models): 5m write 1.25× base input; 1h write 2×; read usually 0.1× (0.05× Opus/Sonnet 5.5; 0.025× Fable/Mythos 5.1). Opus 5.5 e.g. $4/$5/$8/$0.20 per MTok (base/5m/1h/hit). USD/MTok.. Up to 4 cache breakpoints; minimum tokens per model as in Cache limitations. source
  • OpenAI GPT-5.6+ cache writes and reads (multipliers): GPT-5.6+: writes are total rates — 1.25× uncached (30m TTL), 2.5× (12h TTL). Reads 0.1× uncached (0.05× GPT-6.1 Sol/Terra). Pre-GPT-5.6: no extra write charge; model-specific cached rate. source
  • Google Gemini Developer API context caching (Paid Standard, USD per 1M tokens): Gemini 4 Argon: caching $0.10→$0.20/MTok after Nov 30 2026. 3.8 Flash: $0.075→$0.15 + storage $0.50→$1.00/MTok/hr. 3.1 Pro: $0.20/$0.40 by size + $4.50/MTok/hr. 2.5 similar. USD.. Explicit caching not supported on Gemini 4 Argon; Context caching access is a Paid-tier feature on the pricing page. source
  • Google Cloud Agent Platform caching cost model: Create-cache tokens at standard input. Explicit has storage; implicit does not. Implicit: 90% discount on cached tokens. Explicit: 90% on Gemini 2.5+; 75% on Gemini 2.0. source
  • OpenRouter-reported provider cache multipliers: Anthropic via OR: 5m write 1.25×, 1h 2×, read 0.1×. OpenAI: GPT-5.6+ write 1.25× auto / 12h 2.5×; reads at model discount. Gemini: implicit cached 0.25× input; no write/storage on implicit. source

Recent changes

  • 2026-09-01: Anthropic pricing page states Claude Sonnet 5 $2/$10 per million input/output (announced as introductory through August 31, 2026) is now the standard price; the previously scheduled increase to $3/$15 on September 1, 2026 will not occur. source
  • 2026-07-30: OpenAI pricing notes: Priority processing was renamed Fast mode on July 30, 2026; regional/data-residency endpoints charge a 10% uplift for models released on or after March 5, 2026; GPT-5.6 Sol promotional pricing available until November 30, 2026. source
  • 2026-11-06: Google Gemini 4 Argon Paid Standard lists Context caching price $0.10/MTok through November 30, 2026 then $0.20, with explicit caching not supported; Gemini 3.8 Flash lists storage $0.50/MTok/hour through December 31, 2026 then $1.00. source
  • 2026-11-06: Google Cloud context caching overview (Agent Platform) last updated 2026-11-06 UTC; documents durable implicit caching (up to 24h max lifetime), 90% cached-token discount, and explicit default TTL of 60 minutes. source

Alternatives

  • Anthropic 1-hour cache vs 5-minute. Use 5m when the same prefix is reused more often than every 5 minutes (hits refresh for free). Use 1h (2x write) when reuse is less frequent than 5m but within an hour, or when latency/rate-limit benefits matter across longer gaps. source
  • OpenAI 30m vs 12h TTL. 30m write at 1.25x for frequent conversation/agent reuse; 12h at 2.5x for stable instructions reused across longer gaps. Mix lifetimes by putting long-lived material first with ttl 12h and session context at 30m. source
  • OpenRouter sticky routing vs manual provider.order. Sticky routing keeps subsequent requests on the same provider after a cache-using call to maximize hits. If you set provider.order manually, your order wins and sticky is not used. source

Traps

  • Anthropic: marking cachecontrol on a block that changes every request (timestamps, incoming user message) never hits cache—writes only at the breakpoint, and lookback finds prior writes, not "stable content behind" the breakpoint. source
  • Anthropic: a growing conversation that pushes the breakpoint ≥20 blocks past the last write misses the lookback; add a second earlier breakpoint. Concurrent requests: cache entry is available only after the first response starts. source
  • OpenAI: a shared prefix is not always a cached prefix—implicitly caching a full request with a dynamic suffix does not create a reusable breakpoint after the static part; place an explicit breakpoint after static content. source
  • OpenAI: switching a follow-up to explicit-only can miss an earlier implicit write unless you place an explicit breakpoint at the same boundary. Extending a message in place (instead of appending) can move a prior endpoint inside the message and prevent reuse. source
  • OpenAI GPT-5.6+: prompts ≥1024 tokens that are sent only once cost more with automatic caching (1.25x write) than with caching disabled via explicit mode and no breakpoints. source
  • Google: explicit caching is unavailable on the Interactions API and on Gemini 4 Argon and onward; use generateContent / CachedContent only on supported Gemini 3 and 2.5 models. source
  • OpenRouter→Google: only the last cachecontrol breakpoint is applied; caching inside the first system/developer message cannot leave an uncached dynamic tail in that same message—move dynamic text to a later user message. source
  • OpenRouter: TTLs are not translated between providers—a cachecontrol ttl is dropped toward OpenAI, and a promptcachebreakpoint ttl is dropped toward Anthropic or Google; promptcacheoptions remains OpenAI-only. source

Evidence / sources

  1. 1docs.claude.com/en/docs/build-with-claude/prompt-caching
  2. 2developers.openai.com/api/docs/guides/prompt-caching
  3. 3ai.google.dev/gemini-api/docs/caching
  4. 4aistudio.google.com/api-reference/caching.md
  5. 5platform.claude.com/docs/en/about-claude/pricing
  6. 6ai.google.dev/gemini-api/docs/pricing
  7. 7docs.cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview
  8. 8openrouter.ai/docs/guides/best-practices/prompt-caching
  9. 9developers.openai.com/api/docs/pricing
All Analysis

Next reads

Read next

Open the graph
  1. 01topicToolsExplore the tools topic hub.
  2. 02topicDeveloper ToolsExplore the developer_tools topic hub.
  3. 03archiveAnalysisOpen the latest authorial analysis.
  4. 04sourcesSourcesSee the original sources this archive cites.
Who read this page?Machine requests, hidden until opened

Loading the privacy-safe route aggregate...

Open the JSON contract