Blog
BlogCached input saves less than you think when output tokens still cost full price.
Concentrate.ai
Prompt caching can reduce the cost of repeated input. The saving depends on how much input is eligible, how often it is reused and how the provider prices cache writes and reads.
A 90% discount on cached input is not a 90% discount on the whole request. Output tokens, uncached input and any other charges still count.
Prompt-prefix caching reuses processing for eligible repeated input while the model generates a new response. Response caching returns a previously stored answer under a matching policy. They have different behavior and should not share one undifferentiated savings claim.
Provider rules also differ. Check the exact model’s minimum eligible input, prefix-matching requirements, expiry behavior and reported usage fields. Do not assume that sending a similar prompt guarantees a cache hit.
Use a simple hypothetical example. Suppose processing a repeated prefix normally costs one unit, creating its cache entry costs 1.25 units, and each later cached read costs 0.1 units.
These are illustrative rates, not a current provider quote. The calculation assumes every later request qualifies before the cache expires.
Now suppose those ten requests also generate output costing ten units. The total falls from 20 units to 12.15 units, a 39.25% saving. The prefix itself became much cheaper, but the full bill did not fall by the same percentage.
A practical cost model needs cache writes, cache reads, uncached input and output as separate quantities. Multiple writes after expiry can change the result substantially. So can a changing system prompt or requests routed to different providers.
Record actual billed usage. A repeated prompt is only a candidate for reuse until the provider’s usage fields show what happened. A gateway dashboard should be reconciled with those fields before publishing a savings figure.
Use the provider’s current documentation, including OpenAI’s prompt-caching guide. Gateway-specific behavior should be checked separately; LLMGateway’s caching documentation is one example.
Cache hit rates explain only part of an AI bill. Use Concentrate’s spend tracking to review spend by team, project, key, model and provider alongside your caching calculations. Compare the total cost of the same workload before and after a change, and confirm the selected provider’s cache pricing and expiry rules before estimating savings.
LLM Gateway
Change models, providers, add fallbacks, and more by running all AI usage through one platform.