LLM API Price Hikes: The Cost Logic Behind the New Pricing
This article breaks down why a major LLM API price increase affects workloads so differently, and how to respond. It explains the shift from per-token billing to reuse-based pricing, shows how to convert tiered prices into a blended cost per million tokens using input-to-output ratio and cache hit rate, and examines why output tokens became the most expensive tier. It also provides a prioritized cost-reduction checklist covering prefix stabilization, observability, input compression, output control, hot-cold tiering, batching, and tiered routing, plus guidance on building a cost-controlled agent stack on Baidu AI Cloud.
1. The Signal: One Price Update, Three Very Different Experiences
After a general-purpose LLM service launched its new-generation version, the price list moved up noticeably: output rose from a little over 20 yuan to 100 yuan per million tokens, uncached input from just over 6 yuan to 20 yuan, and cache hits from just over 1 yuan to 2 yuan. On the surface, output is nearly 4x and input roughly 3x.
But stopping at “prices tripled” leads to the wrong architecture decisions. What matters more is how three ratios changed:
- Uncached input price ÷ cached input price: widened from about 6x to 10x;
- Output price ÷ cached input price: widened from about 25x to 50x;
- Uneven increases across tiers: the cache-hit tier rose the least, the output tier the most.
The message is clear: pricing is shifting from “bill per token” to “bill per reuse capability.” Whoever can get their prefix reused gets the discount; whoever cold-starts every time pays full price or a premium.
2. Converting Prices into Blended Cost per Million Tokens
A single-tier unit price has no decision value; it must be converted into a blended cost. Let R be the input-to-output ratio (input tokens ÷ output tokens), h the cache hit rate, P_hit the hit price, P_miss the uncached price, and P_out the output price:
Effective input unit price = h * P_hit + (1 - h) * P_missBlended unit price = (R * effective input unit price + P_out) / (R + 1)
Scenario A: enterprise long-context agent, R = 20, h = 0.9
Input side = 0.9*2 + 0.1*20 = 3.8Blended = (20*3.8 + 100) / 21 ≈ 8.4 yuan/million tokens
Scenario B: individual developer with scattered calls, R = 5, h = 0.2
Input side = 0.2*2 + 0.8*20 = 16.4Blended = (5*16.4 + 100) / 6 ≈ 30.3 yuan/million tokens
Same model, same price list, yet A’s unit cost is about 1/3.6 of B’s. This is not marketing talk but a direct result of the two formulas. Three implications follow:
- Hit rate is the most sensitive variable. When R is large, every 10-point gain in hit rate is amplified by R in reducing blended cost.
- Input-to-output ratio is the second most sensitive variable. The larger R is, the more input-side optimization pays off; when R approaches 1, output price dominates the bill and the focus should shift to “generate less.”
- The cold-start penalty is institutionalized. The 10x and 50x ratios are, in essence, price discrimination against non-reusable workloads.
3. Why Output Rose the Most: It Comes Down to Cost Structure
In the chat era, a single interaction ranged from tens to a few thousand tokens, with low price sensitivity. The agent era is different: a single task may involve thousands of tool-call steps, accumulate hundreds of thousands of tokens, or run hundreds of agents in parallel continuously for days. Under such workloads, inference cost is no longer determined by “how many words were generated” but jointly by GPU memory occupancy, KV Cache storage, and decode-phase bandwidth, growing linearly or even super-linearly with context length.
The output stage is expensive because it is the only stage that cannot be amortized by caching: every decoding step must read the KV Cache for the entire history and perform a full weight-and-expert memory access. The longer the context, the higher the per-token decode cost. Raising output pricing is equivalent to making the real bottleneck of “long-context decoding” explicit.
Architecture is also pushing up fixed costs. When a model reaches trillion-level parameters and uses a sparse structure with hundreds of experts but activates only a tiny fraction, activated parameters stay controllable, yet the weights resident in GPU memory, the communication overhead from expert routing, and operator optimization under hybrid attention mechanisms all require real compute. These costs are not linear with call volume but are spread across every million tokens in the price list.
4. A Reuse-Oriented Cost-Reduction Checklist
Ordered from highest to lowest payoff:
- Stabilize the prefix. Put system prompts, tool definitions, examples, and knowledge snippets at the very front of the prompt in a fixed order; move volatile fields such as timestamps, random IDs, and user nicknames to the back or remove them. Change the prefix and all downstream caching is invalidated.
- Make hit rate observable. Instrument the gateway to track h, R, average context length, and the distribution of cache-invalidation causes, then build monitoring and alerting dashboards so optimization is data-driven rather than guesswork.
- Compress input. Rerank and deduplicate retrieved snippets, summarize conversation history, and trim tool-returned results to directly reduce the numerator of R.
- Suppress output. Use structured-output constraints, limit reasoning length, and split long-form generation into multiple small steps to attack P_out, the most expensive tier.
- Hot-cold tiering. Keep high-frequency fixed prefixes resident; send low-frequency long documents to object storage and inject them on demand via retrieval, avoiding stuffing large cold data into the context.
- Batching and asynchrony. Separate offline tasks from online interactions into different pools to improve overall utilization.
- Tiered routing. Send simple requests to small-parameter or distilled models and escalate to the large model only for complex reasoning, avoiding “using a sledgehammer to crack a nut.”
Illustrative gateway billing and routing logic:
def estimate_cost(tokens_in, tokens_out, hit_ratio, price):in_unit = hit_ratio * price["hit"] + (1 - hit_ratio) * price["miss"]total = tokens_in * in_unit + tokens_out * price["out"]return total / 1_000_000def route(req, stats):# When hit rate is low and context is long, normalize the prefix and retryif req.context_len > 30000 and stats.hit_ratio < 0.5:req = normalize_prefix(req)model = "small" if req.difficulty < 0.4 else "large"return model, req
5. Implementation: How to Do It on Baidu AI Cloud
Baidu AI Cloud’s general capabilities can be combined into a cost-controlled agent foundation: use the container platform to host the inference gateway and agent runtime, object storage to hold long documents and tool artifacts, a message queue for task decoupling and peak shaving, logging and monitoring/alerting to observe hit rate, input-to-output ratio, and per-task cost, and caching services to carry prefix and retrieval-result reuse. On the model-service side, adopt a “tiered models + unified gateway” approach that consolidates billing, rate-limiting, and caching policies in one place for unified accounting and tuning.
Note that specific billing rules and quotas are subject to the official documentation; all figures here are illustrative derivations based on public list prices, meant to explain the method rather than promise prices.
6. Conclusion
The essence of this price update is turning “context reuse capability” into a first-class citizen. For enterprise long-context workloads it is a discount; for scattered cold-start workloads it is a premium. Engineering teams must now optimize hit rate and input-to-output ratio the way they optimize latency: stabilize prefixes, compress input, suppress output, and make billing observable. Do these four things and unit task cost can keep falling even during a period of rising list prices.
