Understanding the Cost Logic Behind Large Model API Price Increases
This article breaks down why a new-generation LLM API raised its prices across the board, and why the list price alone does not determine your bill. It explains the shift from near-linear pricing to a strongly tiered structure, provides a reusable model for estimating blended cost based on input-output ratio and cache hit rate, and details the inference costs behind output and cache-miss tokens. It also covers prefix caching as a pricing lever, the cost realities of sparse architectures, and the cost gap between chat and agentic workloads, closing with a practical cost-governance checklist for developers.
1. The Pattern: A Pricing Adjustment That Looks Like an Across-the-Board Increase
After a general-purpose large model service launched its new-generation version, the price list changed noticeably: the output side moved from 27 RMB to 100 RMB per million tokens, nearly a 4x increase; uncached input rose from 6.5 RMB to 20 RMB, and cached input from 1.1 RMB to 2 RMB, both around 3x. On the surface this looks like a blanket price hike, but the conclusion changes completely once you lay out the ratio relationships among the three tiers.
In the previous generation, uncached input was about 6x cached input, and output was about 25x cached input; the new generation stretched these ratios to 10x and 50x. In other words:
- The cache-hit tier saw the mildest increase;
- The output tier saw the most aggressive increase;
- The pricing structure shifted from “approximately linear” to “strongly tiered,” using price signals to steer workloads toward reuse.
This is not a simple price hike but a structural reordering of the billing model. Understanding this has more engineering value than arguing about whether it is “expensive.”
2. Calculating the Blended Cost: A Reusable Estimation Model
Let the input-to-output token ratio be $R$, the cache hit rate be $h$, the cached input unit price $P{in}^{hit}$, the uncached input unit price $P{in}^{miss}$, and the output unit price $P_{out}$. Then:
effective input price = h * P_in_hit + (1 - h) * P_in_missblended price = (R * effective input price + P_out) / (R + 1)
Plugging in the new prices (20 / 2 / 100):
Scenario A: Enterprise-grade long-context coding agent
$R=20$, $h=0.9$
effective input price = 2*0.9 + 20*0.1 = 3.8blended price = (20*3.8 + 100) / 21 ≈ 8.4 RMB per million tokens
Scenario B: Low-frequency individual developer, every prompt is different
$R=5$, $h=0.2$
effective input price = 2*0.2 + 20*0.8 = 16.4blended price = (5*16.4 + 100) / 6 ≈ 30.3 RMB per million tokens
Same model, same price list, yet the former’s unit cost is only about one-third of the latter’s. If Scenario B’s hit rate is pushed close to 0, the blended price climbs further toward 34 RMB; if Scenario A’s input-to-output ratio rises to 50:1, the blended price can drop to around 6 RMB. What determines the bill is not the list price but the workload shape.
3. Why Output and Uncached Input Rose the Most
Inference cost is not only linearly sensitive to token count; it grows linearly or even super-linearly with context length, mainly from three sources:
- KV Cache memory footprint: Each request’s key-value cache must stay resident in GPU memory, and under long contexts this often exceeds the weights themselves;
- Decode-phase bandwidth: Autoregressive generation re-reads the entire history cache at every step, making memory bandwidth the bottleneck, with low arithmetic intensity and poor compute utilization;
- Batching and scheduling fragmentation: When request lengths vary widely, padding and scheduling waste rise significantly.
Output and uncached input are precisely the tiers where these three overheads concentrate; the price increase essentially maps real resource consumption back onto price.
4. Why Cache Hits Became a Pricing Lever
The industry commonly adopts a disaggregated inference architecture (decoupling Prefill and Decode) plus prefix cache reuse to raise hit rates. In coding workloads, achieving a high hit rate for stable prefixes such as system prompts, repository context, and tool definitions is a common engineering goal. A hit means the Prefill compute for that portion is amortized, so the price can be set extremely low.
The direct implication for developers: a stable prompt prefix is a discount coupon. Placing volatile content later and stable content earlier is the highest-return step in cost governance.
[stable] system instructions + tool schema + repository conventions + a few examples[semi-stable] conversation summary[volatile] current user question, latest retrieved snippets
5. The Cost Reality of Sparse Architectures
New-generation models commonly feature sparse structures with trillions of total parameters, hundreds of experts, and only a dozen or so experts activated per pass. Fewer activated parameters reduce per-token compute, but the weights resident in memory, the collective communication overhead of expert routing, and the operator optimization cost under hybrid attention mechanisms do not decline proportionally. This explains why “parameter efficiency gains” and “unit price increases” can coexist.
6. The Cost Magnitude Gap Between the Chat Era and the Agent Era
A single-turn conversation is tens to a few thousand tokens, with low price sensitivity. Agentic workloads are entirely different: a single task may involve thousands of tool calls, accumulate hundreds of thousands of tokens, with hundreds of agents running in parallel continuously for days. Under such workloads, any pricing structure adjustment is amplified into an order-of-magnitude difference in the bill, so cost must be treated as a design constraint alongside capacity and latency.
7. A Cost-Governance Checklist for Developers
- Quantify the workload: Measure $R$ and $h$ first, then talk about whether it is expensive;
- Stabilize the prefix: Organize prompts in tiers to maximize hits;
- Compress context: Trim retrieved snippets, summarize history, truncate tool return results;
- Control output: Use structured output and cap the maximum generation length to avoid verbose reasoning;
- Tiered routing: Send simple requests to small models or rules, and escalate only hard problems;
- Observability: Integrate logging services, monitoring alerts, and usage dashboards, aggregate token consumption by business dimension, and set budget thresholds;
- Elastic capacity: Use container platforms and message queues for peak shaving and asynchronization to avoid costly peak-time retries.
8. Conclusion
The real meaning of this round of price adjustment is that billing is moving from “approximately linear by usage” to “tiered by real resource consumption.” For enterprise customers, a stable prefix reused over the long term is equivalent to a discount; for individual workloads with high-frequency changes, it is close to the original price or even a premium. In the model service practice of platforms such as Baidu AI Cloud, the same rule holds: design the workload shape and cache structure first, then evaluate the unit price—that is the correct order for cost engineering.
