LLM API Pricing Hikes: The Cost Logic Behind Token Rates and Agent Practice
This article breaks down why a new-generation LLM API price increase is not a flat hike but a redistribution of pricing structure across uncached input, cached input, and output tiers. It shows how to convert list prices into real effective unit cost using cache hit rate and input-to-output ratio, explains the architectural cost facts behind high cache hit rates, and provides an engineering checklist for prefix stabilization, context and output governance, and tiered routing with budget guardrails. Readers will learn how to measure their own hit rate and ratio before deciding what to change.
1. The Phenomenon: One Price Change, Three Very Different Experiences
When a new model version’s pricing is announced, the most common reaction in developer communities is “across-the-board price hike.” But if you split the price into three tiers—uncached input, cached input, and output—and then look at the ratios between them, the conclusion is completely different: this is not a linear increase, but a redistribution of pricing structure.
Compare a new-generation general-purpose LLM with the previous generation’s code-oriented version (unit: CNY per million tokens):
| Billing tier | Previous generation | New generation | Multiple |
|---|---|---|---|
| Input (cache miss) | 6.5 | 20 | ≈3.1x |
| Input (cache hit) | 1.1 | 2 | ≈1.8x |
| Output | 27 | 100 | ≈3.7x |
What really matters is not the absolute numbers but two ratios:
- Uncached input / cached input: expanded from about 6x to 10x;
- Output / cached input: expanded from about 25x to 50x.
In other words, the mildest increase is in the cache-hit tier, and the sharpest is in the output tier. The “slope” of pricing has been significantly steepened. The implication for engineering is direct: cache hits have shifted from a “cost-saving optimization” to a prerequisite for “being able to afford it at all,” and output tokens have shifted from “generate as needed” to a scarce resource that requires strict budget constraints.
2. Cost Model: Converting List Price into Real Unit Price
List prices are meant for the “average user”; the real bill depends on two variables: cache hit rate and input-to-output ratio. Let the uncached input unit price be P_in, the cached input unit price be P_hit, the output unit price be P_out, the hit rate be h, and the input-to-output ratio be r. Then:
effective input unit price = P_hit * h + P_in * (1 - h)blended unit cost = (r * effective input unit price + P_out) / (r + 1)
Scenario A: enterprise-grade long-context coding assistant, input-to-output ratio 20:1, cache hit rate 90%
effective input unit price = 2*0.9 + 20*0.1 = 3.8blended unit cost = (20*3.8 + 100) / 21 ≈ 8.4 CNY per million tokens
Scenario B: low-frequency individual developer, different prompt every time, hit rate 20%, input-to-output ratio 5:1
effective input unit price = 2*0.2 + 20*0.8 = 16.4blended unit cost = (5*16.4 + 100) / 6 ≈ 30.3 CNY per million tokens
The same model, the same list price, and the former’s unit cost is about one-third of the latter’s. The conclusion can be summed up in one sentence: the new pricing is effectively a discount for customers who reuse the same system prompts and prefixes over the long term, while for low-frequency users who change prompts every time it is the original price or even a premium.
This model has another easily overlooked implication: when the input-to-output ratio is large, no matter how high the output unit price is, its marginal impact on blended cost is diluted; conversely, tasks with short input and long output (such as long-form generation or large-scale rewrites in code completion) are extremely sensitive to the output unit price. When doing capacity planning, measuring your own r value first is more meaningful than staring at the list price.
3. Why This Pricing Is Possible: Cost Facts on the Architecture Side
A high hit rate is not marketing talk but an engineering result of disaggregated inference architecture. A common industry practice is to split prefill and decode into different resource pools: the prefill stage is compute-intensive with high parallelism, while the decode stage is memory-access-intensive and latency-sensitive, and co-locating them causes mutual contention. After the split, the key-value cache of prefixes can be centrally managed and reused across requests, so the hit rate can stay consistently high.
High hit rates are usually supported by three general capabilities: a high-performance cache layer and high-speed interconnect network, an elastically scalable containerized inference resource pool, and a monitoring and alerting system covering hit rate and time-to-first-token. These all belong to general cloud infrastructure categories rather than proprietary features of a particular vendor.
There are also hard constraints on the cost side. Sparse architectures (for example, total parameter counts in the trillions, hundreds of experts, with only a dozen or so experts activated per token) push activated parameters very low, but the weights resident in GPU memory, the cross-device communication caused by expert routing, and operator optimization under hybrid attention mechanisms all require real compute investment. The part of inference cost that grows linearly or even super-linearly with context length comes mainly from the GPU memory footprint of the key-value cache and the bandwidth consumption of the decode stage.
Agent workloads amplify all of this: a single task can involve thousands of tool calls and accumulate hundreds of thousands of tokens, with hundreds of agents running in parallel continuously for days. Under such workloads, pricing at chat-era unit prices would most likely mean losses on the inference side. The price increase is essentially passing the cost curve through faithfully, while using cache discounts to incentivize the behavior of “manufacturing reusable prefixes.”
4. Engineering Response Checklist
4.1 Stabilize the prefix (improve hit rate)
- Layer the prompt: concatenate system prompt, tool definitions, domain knowledge, and user input in a fixed order, with all variable content placed last;
- Do not insert volatile fields such as timestamps, random IDs, or request sequence numbers into the stable prefix;
- Use cache-friendly references for large blocks of content such as long documents and code repository indexes, avoiding retransmission every turn;
- Keep the prefix byte-for-byte identical within a session; any “convenient formatting” will invalidate the entire cache segment.
Illustrative ordering constraint:
[stable] system role + tool schema + long-term knowledge[semi-stable] current task context[volatile] current-turn user input, timestamps, random identifiers
4.2 Govern context and output (reduce absolute volume)
- Apply rolling summarization to historical messages, keeping decision conclusions rather than the raw process;
- Structurally trim tool return results, sending back only necessary fields;
- Set explicit upper limits on output to avoid the model restating the input;
- Use structured output constraints during sampling to enforce format and reduce invalid generation and retries.
4.3 Tiered routing and budget guardrails
Route requests by difficulty: send simple requests to smaller-parameter models or rule-based logic, and reserve the flagship model for complex requests; set token budgets and alert thresholds for each business line, and bring “cost per task” into monitoring as a first-class metric rather than checking the bill at month-end.
minimum metric set for cost observability:hit rate, average input-to-output ratio, tokens consumed per task, cost per task, cache invalidation count
5. Conclusion
The essence of this price adjustment is shifting pricing from “charging an average rate per token” to “differentiated charging by degree of reuse.” For enterprise-grade long-context Agent scenarios, as long as prefix governance is done well, the actual unit cost actually decreases; for low-frequency developers with highly dispersed prompts, they need to rebuild cost advantages through prompt templating, context trimming, and model tiering. Calculating your own hit rate and input-to-output ratio first, then deciding how to change the architecture, is a more valuable action than discussing “how many times it went up.”
