← Blog

Claude API Prompt Caching Pricing Explained

2026-11-23 · 5 min read · SubToAPI Team

Prompt caching pricing on the Claude API works on a two-tier model: you pay a premium to write a prompt segment into the cache, then pay a steep discount every time you read it back for the next request. In short — writing a cache entry costs more than a normal input token, but reading from an existing cache costs a fraction of a normal input token. If your application sends the same system prompt, tool definitions, or document context on every call, caching turns that repeated overhead into a much cheaper line item.

The short answer to "how much does it actually cost": you pay roughly a 25% premium on the tokens you cache the first time (the write), and then roughly a 90% discount on those same tokens every subsequent time you reuse them (the read), as long as the cache entry hasn't expired. The rest of this article breaks down exactly how that math plays out, what counts as a "read" vs a "write," and how to think about it when you're estimating your monthly bill.

How prompt caching billing actually works

Prompt caching lets you mark a portion of your prompt — usually a long system prompt, a big tool schema, a reference document, or conversation history — as cacheable. The first time Claude processes that block, it has to do the full computation and store the result. That's the cache write, and it's billed at a higher rate than a standard input token because the model is doing extra work to persist the state.

Every request after that, within the cache's time-to-live window, that same block is read from cache instead of reprocessed from scratch. That's the cache read, billed at a steep discount compared to normal input tokens.

There are two cost categories you need to track separately on every API response:

The API returns this breakdown in the response usage object, so you can see exactly how many tokens were cache writes vs cache reads on every call. That's important because it's the only way to verify caching is actually saving you money in production rather than assuming it.

Why the pricing shape makes sense

Think of it like a CDN for tokens. The write is expensive because Claude has to compute and store the key-value state for that prompt segment. The read is cheap because the model skips that computation entirely and just reuses the stored state. If you only call an endpoint once, caching costs you more — you pay the write premium and never get the read discount. Caching only pays off when the same prefix is reused multiple times within the cache lifetime.

This is why caching is most valuable for:

It's a poor fit for prompts that are different on every call, or for low-volume endpoints where you'll rarely hit the same cache entry twice before it expires.

A simplified cost example

Say you have a 2,000-token system prompt plus tool definitions that you reuse on every request, and you make 100 calls in a short window (well within the cache TTL).

Without caching: all 100 calls pay full input price for those 2,000 tokens — 200,000 billable input tokens for that segment.

With caching: the first call pays the write premium on 2,000 tokens. The remaining 99 calls pay the discounted read rate on 2,000 tokens each. Even with the write premium on the first call, the blended cost across 100 calls drops dramatically because 99% of those calls are billed at the deep discount instead of full price.

The breakeven point is usually just two or three reuses — after that, every additional read is close to pure savings. If your traffic pattern reuses the same cached block dozens or hundreds of times per TTL window, the savings compound fast.

Things that quietly reset your cache (and your bill)

A few gotchas that trip people up when they're trying to estimate pricing:

Tracking cache costs when you're building on top of the API

If you're routing Claude access through SubToAPI rather than calling Anthropic's API directly, your application keys (sub_live_...) still get full usage metadata on every response, including the input/output/cache token breakdown, so you can reconcile actual spend against what prompt caching should be saving you. That's useful if you've got multiple team members or services sharing one Claude plan and you want to see, per API key, whether caching is actually paying off or whether a particular integration is invalidating the cache on every call. See /docs/messages for the exact response shape, and /docs/streaming if you're caching prompts in a streaming pipeline. Plans start at €9/month on the Solo tier with a free trial at /signup, and full pricing is at /pricing.

questions

Does prompt caching cost extra on top of my normal API usage? No — it replaces part of your normal input token cost. You pay a premium only on the first write, then a discount on every subsequent read, instead of full price on every call.

How long does a cached prompt stay valid before I have to pay the write price again? Cache entries have a limited time-to-live and expire if unused. High-frequency endpoints keep cache entries "warm" by reusing them often enough that they rarely hit full expiry.

Is prompt caching worth it for low-traffic applications? Usually not. If the same cached prefix isn't reused at least a few times before it expires, the write premium outweighs the savings from reads, so caching mainly pays off at moderate-to-high request volume.

Turn your Claude access into an HTTPS API

SubToAPI gives you application API keys, streaming, tool use and usage insights on top of your existing Claude access — set up in minutes.

Start free  Read the quickstart →