Claude API Cache Pricing 23
Published: 2026-07-16 20:27:48 · LLM Gateway Daily · cheapest way to use gpt-5 and claude together · 8 min read
Claude API Cache Pricing: Saving Money on Repeated Prompts in 2026
If you are building applications that repeatedly send similar or identical prompts to Anthropic’s Claude API, you have likely noticed that your monthly bill grows faster than expected. Every API call, even for cached context, costs tokens on both input and output sides, and those costs add up quickly. Anthropic addressed this pain point in early 2025 by introducing prompt caching for Claude models, and by 2026, their pricing model for cached inputs has matured into a significant cost-saving lever for developers. Understanding exactly how Claude API cache pricing works, and when to use it, can cut your per-request costs by as much as 90 percent for repetitive workloads.
The core mechanics are straightforward but carry important nuances. When you enable prompt caching, the Claude API stores a processed representation of your prompt on the server side for a limited time. On subsequent requests that include the same prefix or context, the API bills you for the cached portion at a lower rate rather than reprocessing the full input. As of 2026, Anthropic charges 0.10 USD per million input tokens for cached content, compared to the standard 3.00 USD per million tokens for non-cached input on Claude 3.5 Sonnet. For larger models like Claude 3 Opus, the cache rate is 0.50 USD per million tokens versus 15.00 USD for fresh input. This pricing structure makes caching dramatically cheaper for applications that reuse system prompts, long document contexts, or conversation histories across multiple user sessions.

However, cache pricing is not a simple discount you can apply everywhere. The cache has a time-to-live of five minutes by default, which means if you do not hit the cache within that window, the server discards the stored representation and you pay full price on the next request. This constraint makes caching most effective for high-frequency, bursty workloads where many requests share identical context in quick succession. For example, a chatbot that loads the same 10,000-token product catalog for every user query within a few minutes benefits enormously. In contrast, a sporadic API caller that sends the same prompt once every hour sees almost no savings because the cache expires before reuse. Developers must design their request patterns to batch or pipeline calls within the cache window to unlock the pricing advantage.
You also need to be careful about what you cache. Only the prefix portion of your prompt is eligible for caching, and the entire prefix must match exactly for the discount to apply. If you append user-specific instructions or variable data at the end of your prompt, the cached prefix still triggers the lower rate on that portion, but any unique suffix is billed at full price. This means you should structure your prompts with static context at the beginning and dynamic content at the tail. Developers using frameworks like LangChain or Vercel AI SDK can implement this pattern by separating system instructions, knowledge base excerpts, and conversation history into a fixed cacheable block, then appending the latest user message as uncached text. Doing so maximizes the portion billed at the cache rate.
Several third-party services have emerged to help developers manage and optimize cache usage across multiple providers, including Anthropic, OpenAI, and Google Gemini. For instance, TokenMix.ai offers 171 AI models from 14 providers behind a single API with an OpenAI-compatible endpoint, meaning you can drop it into existing OpenAI SDK code with minimal changes. It operates on a pay-as-you-go model with no monthly subscription, and includes automatic provider failover and routing, which can help you switch between Claude, GPT-4o, Gemini, DeepSeek, or Mistral without rewriting cache logic. Other alternatives like OpenRouter, LiteLLM, and Portkey provide similar multi-provider abstractions, though their caching policies and pricing vary. When evaluating these tools, pay attention to whether they support Anthropic’s prompt caching headers natively, because not all routing layers forward the cache-control parameters correctly, which would negate your cost savings.
Real-world scenarios make the pricing dynamics concrete. Consider a customer support application that processes 100,000 requests per day, each with a 5,000-token system prompt and a 2,000-token user question. Without caching, you pay for 7,000 input tokens per request on Claude 3.5 Sonnet at 3.00 USD per million tokens, which amounts to roughly 2.10 USD per day for input alone. With caching enabled on the 5,000-token system prompt, and assuming most requests arrive within the five-minute window, you pay the cache rate of 0.10 USD per million tokens for that portion and the full rate for the user input. The cost drops to about 0.45 USD per day for input tokens, a savings of nearly 80 percent. For larger deployments handling millions of requests, those percentages translate into thousands of dollars saved monthly.
One common mistake is assuming caching works identically across all Anthropic models or API versions. As of 2026, prompt caching is supported on Claude 3.5 Sonnet, Claude 3 Opus, and Claude 4 models, but the cache rates and time-to-live differ slightly. Older Claude 3 Haiku and legacy models do not support caching at all, so ensure your application explicitly checks the model’s caching documentation. Additionally, the cache is tied to the API key and region you use, meaning a cached prompt from a key in us-east-1 is not accessible from a key in eu-west-1. If you distribute requests across multiple regions for latency reasons, you will need to warm the cache independently in each region, which can increase overall cost until the cache is populated. Planning your regional strategy ahead of time prevents surprises on your bill.
Finally, integrating cache pricing into your application requires careful monitoring and testing. Anthropic provides cache-related metrics in their API response headers, including whether a request hit or missed the cache, and the number of cached input tokens. Log these metrics and correlate them with response times and costs. You might discover that for certain use cases, such as one-shot document summarization or rare queries, caching actually adds latency overhead because the cache lookup takes longer than reprocessing a small prompt. In those edge cases, disabling caching per request via the cache-control header may be more efficient. The key takeaway is that Claude API cache pricing is a powerful tool for high-volume, repetitive workloads, but it demands intentional prompt design, traffic timing, and multi-region awareness to realize its full savings potential.

