Understanding the Cost Logic Behind Large Model API Price Increases
This article breaks down why a general-purpose large model API raised its prices across all tiers, and why the real signal lies in the ratio structure rather than the absolute numbers. It explains the three-tier pricing model (cache-miss input, cache-hit input, output), shows how to model effective and blended unit cost using cache hit rate and input-output token ratio, and compares two usage scenarios. It also covers why AI Agent workloads force inference costs to rise, and lists engineering practices for turning prefix cache hit rate into an optimizable metric.
1. The Signal: An Across-the-Board Price Adjustment
After a general-purpose large model service launched its new generation, the price list changed significantly: output moved from 27 CNY to 100 CNY per million tokens, nearly a 4x increase; cache-miss input rose from 6.5 CNY to 20 CNY, and cache-hit input from 1.1 CNY to 2 CNY, roughly 3x. On the surface, every tier went up. But if you break down the ratio between tiers, the real signal is not in the absolute values but in the structure.
In the previous generation, cache-miss input was about 6x cache-hit input, and output was about 25x cache-hit input. The new generation widened these ratios to 10x and 50x. In other words, the cache-hit tier saw the mildest increase, while the output tier rose the most. The pricing focus has clearly shifted from “charging an average rate per token” to “differentiated charging based on reuse capability.”
2. Breakdown: Three Tiers and Two Key Ratios
To understand this kind of price list, you only need three values: the cache-miss input unit price, the cache-hit input unit price, and the output unit price, plus two ratios.
Input cache miss P_in_miss = 20Input cache hit P_in_hit = 2Output P_out = 100Miss / Hit = 10xOutput / Hit = 50x
These two ratios determine how sensitive cost is to the degree of prefix reuse. The larger the ratios, the more dramatic the cost difference caused by a cache hit or miss. Whether system prompts, tool definitions, and long-document prefixes can be reused stably directly determines the order of magnitude of the bill.
3. Modeling: Effective Unit Price and Blended Cost
Let the cache hit rate be h and the input-to-output token ratio be r:
Effective input price = h × P_in_hit + (1 - h) × P_in_missBlended price = (r × effective input price + P_out) / (r + 1)
Scenario A: an enterprise-grade coding agent with long context, a fixed system prompt, and a repository prefix, h=0.9, r=20:
Effective input ≈ 2×0.9 + 20×0.1 = 3.8Blended ≈ (20×3.8 + 100) / 21 ≈ 8.4 CNY per million tokens
Scenario B: an individual developer making occasional calls, with a different prompt every time, h=0.2, r=5:
Effective input ≈ 2×0.2 + 20×0.8 = 16.4Blended ≈ (5×16.4 + 100) / 6 ≈ 30.3 CNY per million tokens
For the same model, the former’s unit cost is about one-quarter to one-third of the latter’s. The conclusion is clear: the so-called price increase is close to a discount for high-reuse workloads, while for low-reuse workloads it is the original price or even a premium. Pricing has changed from a “unified price” to “reuse-capability pricing.”
4. Why Prices Must Rise: The Cost Structure of Agent Workloads
In the chat era, a single interaction involved only tens to a few thousand tokens, with low price sensitivity. The Agent era is completely different: a single task may involve thousands of tool calls, accumulating hundreds of thousands of tokens, with hundreds of agents running in parallel continuously for days. At this point, inference-side cost grows linearly or even super-linearly with context length, mainly from four areas:
- KV Cache memory usage expands linearly with context and concurrency;
- Memory bandwidth consumption during the decode phase of long sequences;
- Overhead of resident weights and expert-routing communication in sparse architectures;
- Investment in operator and kernel optimization under hybrid attention mechanisms.
If the previous generation’s prices were used to serve this kind of workload, a single task would lose money on the inference side. The essence of the price increase is to realign the cost curve with the workload curve.
5. Engineering Response: Turning Hit Rate into an Optimizable Metric
- Stable prefix: place the system prompt, tool schema, and domain knowledge at the front and keep them version-fixed, avoiding volatile fields such as timestamps and random IDs that pollute the prefix.
- Layered caching: separate reusable context from one-off context to reduce the cache-miss proportion.
- Context governance: apply summary compression and retrieval-based recall to long histories to control r and the absolute length.
- Observability: track h, r, and blended unit price by business line, set alerts for cache hit rate and per-task cost, and close the loop with logging and monitoring/alerting systems.
- Architecture selection: for high-concurrency long-context scenarios, prioritize general cloud service options with disaggregated inference and prefix caching capabilities, and calibrate the model with small-sample load tests.
def cost(p_hit, p_miss, p_out, hit_rate, io_ratio):eff_in = hit_rate * p_hit + (1 - hit_rate) * p_missreturn (io_ratio * eff_in + p_out) / (io_ratio + 1)
6. Conclusion
A price increase of several times does not mean a cost increase of several times. What truly determines the bill are two engineering metrics: cache hit rate and input-output ratio. If you do prefix reuse, context compression, and cost observability well, unit task cost can remain within a controllable range even during a price-increase cycle; conversely, scattered low-reuse calls will bear the highest marginal cost.
