Prompt caching prices compared

Updated August 20, 2026 · All prices verified against official provider pages.

Prompt caching is the single biggest lever on most production LLM bills: any tokens your requests share — system prompts, tool definitions, few-shot examples, long documents — can bill at ~10% of the normal input rate instead of full price. But each provider prices the mechanism differently, and two of them charge for things the others give away.

The comparison#

Rates for one representative current model per provider, $ per 1M tokens:

Provider (model)InputCache readCache writeStorage fee
OpenAI (GPT-5.6)$5.00$0.50 (10%)$6.25 (1.25x)
OpenAI (GPT-4o, older gen)$2.50$1.25 (50%)free
Anthropic (Sonnet 5)$2.00$0.20 (10%)$2.50 (1.25x, 5-min) / $4.00 (2x, 1-hour)
Google (Gemini 3.7 Flash)$0.75$0.075 (10%)$0.50 per 1M tokens/hour
Google (Gemini 3.1 Pro)$2.00$0.20 (10%)$4.50 per 1M tokens/hour
xAI (Grok 4.6)$2.00$0.50 (25%)
DeepSeek (V4 Pro)$1.32$0.044 (~3%)

Three different philosophies hide in that table:

  • OpenAI and Anthropic bill the write. Creating cache entries costs a 1.25x premium (2x for Anthropic's 1-hour TTL). Caching loses money if the prefix isn't reused — the break-even is roughly two reads per write.
  • Google bills the clock. Cached tokens are cheap, but the cache itself costs money per token-hour while it lives — a 500K-token cache on Pro costs about $2.25/hour just to exist. Long-lived caches on Pro-class models have a real carrying cost.
  • DeepSeek just discounts. Cache hits bill ~1/30th of a miss, no write fee, no storage fee, applied automatically.

Worked example: a 20K-token system prompt, 100K requests/month#

Say every request carries a 20K-token shared prefix (instructions + tool schemas + examples) — 2B prefix tokens a month. On Claude Sonnet 5:

  • No caching: 2B × $2.00/1M = $4,000/month
  • With caching (say 95% of requests hit a warm 5-min cache): 1.9B reads × $0.20/1M + 100M writes × $2.50/1M = $380 + $250 = $630/month

Six times cheaper, from one config change. The arithmetic is similar on OpenAI's GPT-5.6 family, and even more favorable on DeepSeek.

The tracking trap: cached tokens are counted differently#

If you compute costs yourself from usage objects, know that providers disagree on what "input tokens" means:

  • Anthropic and Bedrock report input_tokens excluding cache reads and writes — the separate cache_read_input_tokens / cache_creation_input_tokens fields carry those.
  • OpenAI and Gemini report input including cached tokens, with the cached share as a sub-detail.

Cost trackers that miss this bill cached tokens twice — a documented bug class with errors up to 2x. (Marginal normalizes both dialects at ingest, so track() takes each provider's usage object as-is.)

See current prices for every model, or check a specific model's cache rates on its page.

List prices are the easy part.

Marginal tracks what you actually spend — every LLM call priced at that day's rates and sliced by customer, feature, or any field you define. Integration is one track() call.