Prompt Caching: Cost & Performance Analysis Across Providers

Prompt caching can cut input token costs by up to 90% and makes long context workloads viable. Compare cache pricing, discounts and API specifications across all major AI providers below.

Caching requires exact prompt matches and varies by provider - some like OpenAI and DeepSeek offer automatic caching, while others including Google, Anthropic, and Amazon require manual setup. Learn more about how it works in our introduction to prompt caching below.

Pricing

Pricing: Cache Hit, Cache Write, Input, and Output

Price (USD per M Tokens)
Reasoning models are indicated by a lightbulb icon

Price per token for cached prompts (previously processed), typically offering a significant discount compared to regular input price, represented as USD per million tokens. The values shown here are the cache hit price; cache write and cache storage are billed separately and vary by provider — see "Cache pricing by provider" for detail.

Price per token to write prompt tokens into the cache so that later requests can hit them, represented as USD per million tokens. Some providers charge a premium over the standard input price to create a cache entry (e.g. Anthropic), while others cache automatically with no separate write fee.

Price per token included in the request/message sent to the API, represented as USD per million Tokens.

The blended cache price shown here uses cache hit price only. Other caching costs differ by provider:

  • Anthropic: charges a separate cache write fee, with different rates for 5-minute and 1-hour TTLs (1-hour TTL is more expensive).
  • Google (Vertex/Gemini): charges a per-hour cache storage fee in addition to cache hit pricing. Some providers also use tiered pricing for prompts above 200K tokens.
  • OpenAI, DeepSeek, others: typically charge only cache hit pricing with no write or storage fee.

See Prompt Caching for the full breakdown.

Price per token generated by the model (received from the API), represented as USD per million Tokens.

Figures represent performance of the model's first-party API (e.g. OpenAI for o1) or the median across providers where a first-party API is not available (e.g. Meta's Llama models).

Cache Discount

Pricing: Cache Discount

1 - (cache hit price / input price) · Higher is better
Reasoning models are indicated by a lightbulb icon

Reduction in input token cost due to cache hit relative to input price. Formula: 1 - (Cache Hit Price per Token / Input Token Price), where cache hit price is the first-party cache hit price or the median provider cache hit price. Note that this discount figure does not account for all costs associated with cache hits, such as cache write and storage costs.

Price per token for cached prompts (previously processed), typically offering a significant discount compared to regular input price, represented as USD per million tokens. The values shown here are the cache hit price; cache write and cache storage are billed separately and vary by provider — see "Cache pricing by provider" for detail.

The blended cache price shown here uses cache hit price only. Other caching costs differ by provider:

  • Anthropic: charges a separate cache write fee, with different rates for 5-minute and 1-hour TTLs (1-hour TTL is more expensive).
  • Google (Vertex/Gemini): charges a per-hour cache storage fee in addition to cache hit pricing. Some providers also use tiered pricing for prompts above 200K tokens.
  • OpenAI, DeepSeek, others: typically charge only cache hit pricing with no write or storage fee.

See Prompt Caching for the full breakdown.

Figures represent performance of the model's first-party API (e.g. OpenAI for o1) or the median across providers where a first-party API is not available (e.g. Meta's Llama models).

Prompt Caching API Specifications

Provider
Model
Input (standard)
Cache write
Cache hit
Cache storage
Output (standard)
Auto-Enabled
Min tokens
Cache TTL
Notes
AnthropicAnthropic
  • Cache read tokens are 90% cheaper than base input tokens
  • Cache write tokens are 25% more expensive than base input tokens
Claude Fable 5 (Adaptive Reasoning, Max Effort, Opus 4.8 Fallback)
$10.00
$12.50
$1.00
$20.00
$50.00
-
-
Claude Opus 4.8 (Adaptive Reasoning, Max Effort)
$5.00
$6.25
$0.50
$10.00
$25.00
-
-

1h cache write: $10

GoogleGoogle
  • Google supports caching for Gemini models and Anthropic's Claude models.
  • Pricing and usage differs between model families.
Claude Fable 5 (Adaptive Reasoning, Max Effort, Opus 4.8 Fallback)
$10.00
$12.50
$1.00
-
$50.00
-
-
Claude Opus 4.8 (Adaptive Reasoning, Max Effort)
$5.00
$6.25
$0.50
-
$25.00
-
-
OpenAIOpenAI
  • Cache read tokens are 50% cheaper than base input tokens
  • Cache persists up to one hour during off-peak periods
GPT-5.5 (xhigh)
$5.00
-
$0.50
-
$30.00
1024
5-10 minutes
GPT-5.4 mini (xhigh)
$0.75
-
$0.07
-
$4.50
-
-
Kimi K2.6
$0.95
-
$0.16
-
$4.00
-
-
Amazon BedrockAmazon Bedrock
  • Amazon supports caching for Nova models and Anthropic's Claude models.
  • Pricing and usage differs between model families.
Claude Opus 4.8 (Adaptive Reasoning, Max Effort)
$5.00
$6.25
$0.50
-
$25.00
-
-
GPT-5.5 (xhigh)
$5.50
-
$0.55
-
$33.00
-
-
SpaceXAISpaceXAI
  • Prompt caching is not 100% guaranteed.
Grok 4.3 (high)
$1.25
$1.25
$0.20
-
$2.50
-
-

For requests greater than 200k tokens, pricing is $2.50 per 1M input tokens, $0.40 per 1M cached input tokens, and $5.00 per 1M output tokens

Microsoft AzureMicrosoft Azure

OpenAI models:

  • Cache read tokens are 50% cheaper than base input tokens (Standard deployments)
  • Cache persists up to one hour during off-peak periods
Claude Sonnet 5 (Adaptive Reasoning, Max Effort)
$3.00
$3.75
$0.30
-
$15.00
-
-
GPT-5.4 mini (xhigh)
$0.75
-
$0.07
-
$4.50
-
-
Kimi K2.6
$0.95
-
$0.16
-
$4.00
-
-
Kimi K2.6
$0.95
-
$0.16
-
$4.00
-
-
DeepInfraDeepInfra
  • Prompt caching is automatic — no extra parameters required.
DeepSeek V4 Pro (Reasoning, Max Effort)
$1.30
-
$0.10
-
$2.60
-
-
Kimi K2.6
$0.75
-
$0.15
-
$3.50
-
-
FireworksFireworks
  • Prompt caching is enabled by default.
  • The default discount is 50%, but the exact discount varies by model.
DeepSeek V4 Pro (Reasoning, Max Effort)
$1.74
-
$0.14
-
$3.48
-
-
Kimi K2.6
$0.95
-
$0.16
-
$4.00
-
-
GMIGMI
DeepSeek V4 Pro (Reasoning, Max Effort)
$1.39
-
$0.12
-
$2.78
-
-
Kimi K2.6
$0.85
-
$0.14
-
$3.60
-
-
DeepSeek V4 Pro (Reasoning, Max Effort)
$1.60
-
$0.14
-
$3.20
-
-
Kimi K2.6
$0.80
-
$0.16
-
$3.40
-
-
Kimi K2.6
$0.75
-
$0.20
-
$3.50
-
-
DeepSeek V4 Pro (Reasoning, Max Effort)
$1.74
-
$0.14
-
$3.48
-
-
Kimi K2.6
$1.40
-
$0.26
-
$4.40
-
-
DeepSeek V4 Pro (Reasoning, Max Effort)
$2.10
-
$0.20
-
$4.40
-
-
Kimi K2.6
$1.20
-
$0.20
-
$4.50
-
-
DeepSeekDeepSeek
  • Cache read tokens are 50% cheaper on average (up to 90% with cache optimization)
  • Implements Context Caching on Disk technology
  • No guarantee of 100% cache hits
DeepSeek V4 Pro (Reasoning, Max Effort)
$0.43
-
$0.00
Free
$0.87
64
-
CloudflareCloudflare
  • Prefix caching is enabled by default. To maximize cache hit rates, a header must be sent.
Kimi K2.6
$0.95
-
$0.16
-
$4.00
-
-
CrusoeCrusoe
Kimi K2.6
$0.70
-
$0.35
-
$3.50
-
-

Introduction to Prompt Caching

What is Prompt Caching?

Prompt caching lets language model inference reuse previously processed input tokens, cutting their cost by up to 90% and making long context workloads viable. Getting your approach to caching right can deliver huge cost savings on input tokens and meaningful performance benefits.

When you send a prompt, the system first checks if that exact prompt has been processed before. If found (cache hit), it returns the stored response instead of generating a new one. If not found (cache miss), the prompt is processed normally, and the response is stored for future use.

Key Metrics to Watch

  • Input Price: The standard price you pay for input tokens
  • Cache Write Price: What you pay to save prompt tokens into the cache; sometimes higher than standard input pricing
  • Cache Hit Price: Discounted rate for prompt tokens that hit the cache
  • Cache Storage Price: Hourly cost per million cached tokens (currently unique to Google)
  • Cache TTL: The time cached tokens remain available, ranging from hours to days
  • Cache Minimum Tokens: Minimum matching token count required before a cache hit is served

How Does Prompt Caching Work?

When you send a prompt to a transformer-based language model, the attention layers process each input token into key (K) and value (V) vectors that are stored in the KV cache. By keeping these values in memory, processing on input tokens can be avoided when identical input tokens are sent into the model again.

Until recently, leveraging the speed and cost benefits of caching was only available for dedicated deployments. Now, serverless API providers—including the frontier labs—have begun passing on some of the cost benefits of caching to developers.

Optimal Use Cases

  • System instructions: Large system prompts that must be included across many interactions
  • Chat history: Conversation context that accompanies each new user turn
  • Per-user personalized context: Extensive user memories or profiles that enable deep personalization

Implementation Considerations

  • Activation method varies by provider - some require manual setup while others offer automatic caching
  • Cache hit discounts range from 50-90% off standard input token pricing - this really is worth the time to get right
  • Caching improves performance for very long prompts (50k+ tokens)