Understanding the Cost Logic Behind Large Model API Price Increases
This article breaks down the cost logic behind a recent large model API price increase, showing how the new pricing shifts the focus from raw token counts to effective compute consumption. It introduces a blended cost model based on the input-to-output ratio and cache hit rate, explains why the Agent era makes repricing inevitable, and outlines practical engineering measures such as prefix stabilization, context layering, output budget constraints, cost observability, and elastic compute to control spending.
1. The Signal: One Price Change, Three Very Different Experiences
A new-generation model from an AI coding tool raised its public pricing significantly: the output side climbed from roughly 27 CNY to 100 CNY per million tokens, nearly a fourfold increase; uncached input rose from 6.5 CNY to 20 CNY, and cached input from 1.1 CNY to 2 CNY, both around threefold. Looking at the price table alone, the conclusion seems straightforward—prices rose across the board and cost pressure jumped.
But comparing the ratios across tiers reveals another layer of structure:
- The ratio of uncached to cached input widened from about 6x in the previous generation to 10x;
- The ratio of output to cached input widened from about 25x to 50x;
- The most moderate increase was the cached-input tier, while the steepest was the output tier.
These shifting ratios show that the new pricing is not simply “multiply everything by one factor.” Instead, it redistributes the relative weights among tiers. The pricing focus has moved from “token count” to “effective compute consumption.” Whoever reuses more gets an effective unit price closer to the cached-input rate; whoever starts cold every time settles at a bill close to the original price or even a premium.
2. The Cost Model: Converting List Prices into Real Unit Prices
To judge the impact of the increase, you need two variables: the input-to-output ratio (R) and the cache hit rate (h). The effective input price is a weighted blend of the cached and uncached rates, while the output side typically gets no cache discount.
def blended_price(p_in_miss, p_in_hit, p_out, ratio, hit):in_price = p_in_hit * hit + p_in_miss * (1 - hit)return (ratio * in_price + p_out) / (ratio + 1)# Enterprise long-context Agent: input-to-output ratio 20:1, hit rate 90%print(blended_price(20, 2, 100, 20, 0.9)) # ≈ 8.4 CNY per million tokens# Occasional developer: input-to-output ratio 5:1, hit rate 20%print(blended_price(20, 2, 100, 5, 0.2)) # ≈ 30.3 CNY per million tokens
The gap between the two scenarios is about 3.6x. In other words, under the same price table, customers who reuse the same system prompt and prefix over the long term get a discounted rate, while individual developers who swap prompts every time get a bill close to the original price. How much the increase actually hurts depends on which side of the model you fall on.
3. Why the Agent Era Forces a Recalculation
In the chat era, a single interaction involved only tens to a few thousand tokens, so price swings were almost imperceptible. The Agent era is completely different: a single task can involve thousands of tool-call steps and accumulate hundreds of thousands of tokens, with hundreds of Agents running in parallel and continuously for days. At that point, GPU memory usage on the inference side, KV Cache storage, and bandwidth overhead during the decoding phase all grow linearly or even super-linearly with context length. Running such tasks at the old prices means the provider loses money, so a price increase is inevitable.
From a model-structure perspective, sparsification is the mainstream way to control cost: total parameter counts reach the trillion scale, but only a small fraction of experts are activated per call. Yet fewer activated parameters does not mean lower cost—weights that stay resident in GPU memory, communication overhead from expert routing, and operator optimization under hybrid attention mechanisms all require real compute. Tilting pricing toward output and uncached input essentially makes these fixed and peak costs explicit.
4. Actionable Mitigations
- Prefix stabilization: Pin the system prompt, tool descriptions, and few-shot examples at the very front of the context and keep them byte-for-byte identical, avoiding volatile content such as timestamps and random IDs that pollute the prefix.
- Context layering: Separate long-term memory from transient state; summarize or retrieve long documents first, and inject only the necessary fragments into the current request.
- Output budget constraints: Set field limits and truncation policies for structured output; output is the most expensive tier, so trimming redundant phrasing yields the most direct savings.
- Observability: Use logging services and monitoring alerts to track token consumption and hit rates by business dimension, attributing cost to specific tasks rather than settling up only at month-end.
- Elastic compute: Run parallel Agent tasks on a container platform with elastic scaling, and use object storage to persist intermediate artifacts, so long-running tasks do not crowd out the online request path.
5. Conclusion
The essence of this repricing is a shift in the pricing model from “pay per usage” to “pay for effective compute.” Cache hit rate and input-to-output ratio have replaced the unit price itself as the primary driver of cost. When evaluating a new model, developers should not just compare numbers on the price table; they should first run a blended unit price using their own business’s R and h, then decide on architecture changes and budget allocation. In general engineering practice on platforms such as Baidu AI Cloud, treating cache reuse, context governance, and cost observability as first-class concerns is a sound path for handling this kind of structural price increase.
