LLM API Pricing Increases: Cost Logic and Model Selection Practices
This article explains why a new-generation LLM API can charge a higher price per million tokens without necessarily inflating the total bill. It breaks down the three billing dimensions—input, output, and cache-hit tokens—and the structural reasons behind price increases, then shows how to build a cost-per-task model and apply engineering practices such as prefix stabilization, context layering, output constraints, routing, batching, and observability to keep spending under control.
1. Why a Price Change Sparked Broad Discussion
A recent new-generation release from a Chinese LLM provider published updated API pricing: output tokens reached the level of roughly a hundred yuan per million tokens, input tokens around twenty yuan, and cache-hit tokens around one yuan—several times higher than the previous generation. The discussion was heated not because of the numbers themselves, but because they broke the expectation built up over the past two years that per-token prices would keep falling.
It helps to bring the discussion back to a more practical level. With inference demand growing rapidly, context windows getting longer, and multimodal input and tool calling becoming standard, comparing “how much per million tokens” alone is no longer enough to support a selection decision. What actually determines the bill is three things: the unit price, the token consumption per task, and the discount power that comes from caching and batching. Ignoring the latter two usually distorts the conclusion of a price comparison.
2. Breaking Down the Bill: How the Three Billing Items Differ
Billing for mainstream inference services usually falls into three dimensions. Understanding their cost structures explains why a new-generation model can be “more expensive per token yet not necessarily out of control in total spend.”
- Input tokens: correspond to the prefill stage, where computation is highly parallelizable but scales linearly with context length, so the share is very high in long-document scenarios.
- Output tokens: correspond to the decoding stage, generated autoregressively token by token with no parallelism; memory bandwidth and occupancy time become the bottleneck, which is why the unit price is typically several times that of input.
- Cache-hit tokens: contexts that are fully identical in prefix and reusable (system prompts, long documents, code repository snippets) are charged at a very low rate, essentially converting repeated computation into storage and lookup.
The illustrative cost estimation logic can be written as:
def estimate_cost(in_tok, out_tok, cached_tok,p_in, p_out, p_cache):# All prices are per million tokensreturn (in_tok * p_in + out_tok * p_out+ cached_tok * p_cache) / 1_000_000
Key takeaway: when input accounts for a far larger share than output and the prefix is highly repetitive, each step up in cache hit rate improves the total bill more than a cut in unit price does.
3. Why the New Generation Costs More: Four Structural Reasons
- Larger parameter and compute scale. Expanding model capacity directly raises the memory and compute cost of a single forward pass; if inference optimization and cost reductions in compute supply cannot keep pace, prices inevitably come under pressure.
- Long context as a default capability. Once the context window grows, attention computation and memory usage rise significantly, passively increasing the cost share of long-text input.
- A shift from “conversation” to “completing tasks.” Scenarios such as file understanding, content writing, data analysis, and intelligent coding mean multi-turn calls, tool orchestration, and longer outputs; token consumption per task can be several times that of plain question answering.
- The pricing anchor moving from API to subscription. Once the main consumption entry point shifts to subscription and coding-tool formats, API pricing is more of a “marginal price,” its cross-comparability declines, and the evaluation focus should move to the actual usage that a subscription quota can support.
4. Compare Cost per Task, Not Unit Price
A more reliable comparison is “the cost of completing one task,” not the price per million tokens.
Cost per task = Σ(input tokens × input unit price)+ Σ(output tokens × output unit price)- cache hit discount+ extra consumption from failed retries and timeouts
In practice, a three-step approach is recommended: first, build a baseline with twenty to fifty real business samples; then record the input/output distribution and retry rate for each sample; finally, convert to “cost per thousand tasks” and align it with business gross margin. Models evaluated without retry and failure rates will be systematically underestimated.
5. Cost-Reduction Practices on the Engineering Side
- Prefix stabilization: putting system prompts, tool definitions, and fixed instructions at the very front without dynamic concatenation is the prerequisite for cache hits; even inserting a timestamp into the prefix invalidates the entire cached segment.
- Context layering: manage resident context, retrieved snippets, and temporary input separately to avoid repeatedly passing long documents in full.
- Output constraints: use structured output and length limits to control decoding cost; since the output side has the highest unit price, compressing output yields the most direct benefit.
- Routing and fallback: send simple requests to a small model or a rules-based path and escalate complex ones, combined with timeout and retry budgets.
- Batching and asynchrony: use asynchronous batch channels for offline analysis tasks, which usually buys a better price.
- Observability: tag and measure tokens and cost by business dimension, and configure budget alerts to avoid an out-of-control bill at month end.
def route(req):if req.estimated_output < 200 and not req.need_tools:return small_modelreturn large_model
6. Selection Advice and Trend Outlook
In the face of price increases, the rational strategy is not to migrate immediately but to run a structured review: measure the real token distribution, assess cache feasibility, and calculate the cost per task before deciding whether to stay on pay-as-you-go, switch to a subscription, or adopt multi-model hybrid routing. It is also worth watching inference-side optimization, compute capacity expansion, and the iteration pace of subsequent models in the same generation—in a market where capabilities evolve quickly, pricing is usually phase-specific, and making the architecture replaceable, observable, and degradable is the most effective way to hedge against price swings.
