LLM API Price Increases: How Cache Billing Logic Actually Works
This article breaks down a new-generation LLM API price adjustment into three billing tiers—uncached input, cached input, and output—and shows why the real story is in the ratios rather than the headline numbers. It explains the engineering prerequisites behind low cache-hit pricing, provides two reproducible cost scenarios driven by hit rate and input-to-output ratio, and lists practical optimization and contract-evaluation steps for engineering teams.
1. Break the “Price Increase” into Comparable Unit Prices
When discussing a price adjustment, the most common mistake is fixating on a single number. A more reliable approach is to split billing into three tiers: uncached input, cached input, and output. The public list prices of a certain new-generation model series take this shape: output is roughly four times the previous generation, while both uncached and cached input are roughly three times the previous generation. If you only look at “output rose to 100 CNY per million tokens,” the conclusion will inevitably be that everything got more expensive. Put the three tiers side by side, however, and a structural change appears, hidden inside the ratios.
What deserves attention is not the absolute price but the ratios:
- The ratio of uncached input to cached input widened from roughly 6x in the previous generation to roughly 10x.
- The ratio of output to cached input widened from roughly 25x to roughly 50x.
- The cached tier saw the smallest absolute increase; the output tier saw the largest.
The signal here is clear: the pricing system is widening the gap between “reusable prefixes” and “new content that cannot be reused.” In other words, the focus of price design is shifting from linear pay-per-volume billing toward differentiated billing based on the degree of reuse.
2. Why Vendors Can Push Hit Prices So Low
A low hit price is not a marketing posture; it rests on a clear engineering premise: prefix cache reuse must actually happen, and the hit rate must be high enough. A common industry approach is to split inference into two phases—context encoding and token-by-token generation—and centrally manage the intermediate state produced by the former (commonly called the KV cache), so that requests sharing the same prefix can skip redundant encoding. Combined with a “prefix affinity” strategy in request scheduling, which routes requests carrying the same prefix to the same batch of cache nodes as much as possible, the hit rate can enter a high range.
It is worth stressing that this capability is a general industry technical route, with large differences in implementation details. Externally disclosed hit-rate figures often correspond to specific scenarios (for example, long sessions in AI coding tools where the system prompt and repository context are highly fixed). Readers should not transplant a high hit rate from one scenario directly onto their own business; instead, they should treat it as a hypothesis that needs to be validated through load testing.
3. Two Recomputable Scenarios: The Gap Comes from Structure, Not Scale
Let the input-to-output ratio be R (input tokens divided by output tokens), the hit rate be h, the hit unit price be Pin_hit, the uncached unit price be Pin_miss, and the output unit price be Pout. The blended cost per token is:
effective input unit price = h * Pin_hit + (1 - h) * Pin_missblended unit price = (R * effective input unit price + Pout) / (R + 1)
Scenario A: an enterprise long-context agent, R≈20, h≈0.9, hit 2 CNY, uncached 20 CNY, output 100 CNY.
effective input unit price ≈ 0.9*2 + 0.1*20 = 3.8blended unit price ≈ (20*3.8 + 100) / 21 ≈ 8.4 CNY per million tokens
Scenario B: a low-frequency individual developer whose prompt differs every time, R≈5, h≈0.2.
effective input unit price ≈ 0.2*2 + 0.8*20 = 16.4blended unit price ≈ (5*16.4 + 100) / 6 ≈ 30.3 CNY per million tokens
Same model, same list price: the former’s unit cost is a little more than one-third of the latter’s. The conclusion is not that “the increase is mild,” but that customers who reuse the same system prompt and fixed prefix over the long term receive a discounted price, while callers who change their prompt every time pay the list price or even a premium.
4. Get the Math Right: Hit Rate and Input-to-Output Ratio Are the Main Variables
The formula reveals two sensitive points. First, the hit rate affects the input-side unit price linearly, with a slope equal to the price gap between hit and uncached; when that gap is stretched to 10x, a ten-percentage-point swing in hit rate is enough to swallow a double-digit-percentage price adjustment. Second, the input-to-output ratio determines how thinly the most expensive tier, output, is amortized: the larger R is, the thinner the expensive output is spread; when R approaches 1, output almost dominates the bill.
Therefore, to evaluate any price adjustment, you should first measure the two real parameters of your own business and then plug them into the formula, rather than making intuitive judgments based on list prices. The recommended measurement definitions are:
- Hit rate: count “cached input tokens / total input tokens” daily or per session, distinguishing cold starts from new sessions.
- Input-to-output ratio: separately count the token volume of the system prompt, retrieved context, conversation history, user input, and model output.
- Tiered billing: break costs down by the three tiers for attribution, and locate where cost concentrates.
5. An Engineering-Side Optimization Checklist
Since the price gap is deliberately widened, the optimization focus should shift accordingly.
- Prefix stability governance. Place the system prompt, tool definitions, examples, and retrieval templates at the very front of the prompt, and keep them byte-level stable; avoid injecting timestamps, random request IDs, or dynamically sorted results at the head.
- Session and cache affinity. Route multiple turns of the same session to the same inference instance to reduce cache eviction; for high-concurrency scenarios, evaluate whether cache capacity and eviction policy match the number of prefixes.
- Context layering. Strictly separate a stable layer (unchanged), a semi-stable layer (low-frequency changes), and a volatile layer (changes every turn), place volatile content last, and maximize the reusable prefix length.
- Output-side control. Output is the most expensive tier, so compress wasted tokens through structured output constraints, segmented generation, and, where necessary, using a smaller-parameter model to draft and then verify.
- Observability. Use monitoring, alerting, and logging services to build dashboards for token consumption, hit rate, and per-session cost, and set budget thresholds and anomaly alerts.
- Architectural decoupling. Make cache management, scheduling, and rate limiting independent components so they can migrate between container platforms and object storage across different cloud platforms, avoiding lock-in to a single billing model.
6. Selection and Contract Considerations
A change in price structure changes the cost-performance ranking. For high-reuse, long-context scenarios, a plan with a low hit price has a clear advantage; for low-reuse, short-interaction scenarios, focus on comparing uncached input and output unit prices. When evaluating, three things are recommended: run a small-scale load test with real traffic replay to verify whether the advertised hit rate can be reproduced; specify the billing definition and price-adjustment mechanism in the contract; and keep alternative paths such as multiple vendors and self-hosted inference, treating portability as a hard requirement.
If you use relevant capabilities from Baidu AI Cloud, you can put the above methods directly into practice: use the container platform to host inference and cache components, use object storage to accumulate prompt templates and evaluation sets, and use logging and monitoring services to achieve token-level cost attribution, so you can quickly recompute and optimize when the price structure changes.
7. Conclusion
The essence of this adjustment is not a across-the-board increase, but precisely allocating cost pressure to calling patterns that do not reuse. The smallest increase in the hit price, the largest increase in output, and the widening of the hit-to-uncached gap to 10x together form a pricing mechanism that steers users toward reusing prefixes. For developers, the right response is not to complain about list prices, but to measure your own hit rate and input-to-output ratio, recompute the real unit price with the formula, and then raise the hit rate through prefix governance and context layering—this is both a way to save money and an engineering threshold for whether long-context applications can scale.
