LLM API Pricing Jumped 5x: The Cost Logic Behind It

    Why a 5x price increase does not always mean a 5x higher bill. This article breaks down three-tier LLM API pricing, cache economics, common cost estimation mistakes, and a reusable framework for comparing cost per task and cost per unit of useful output.

    1. The Trigger: Why One Price Change Sparked So Much Debate

    A recent price increase for a next-generation general-purpose LLM API drew widespread attention. Compared with the previous generation, the price rose roughly fivefold: output reached around 100 CNY per million tokens, input around 20 CNY, and cache hits only around 1 CNY.

    The discussion quickly split into two camps. One argued the increase was justified because the model ranked among the global top three on benchmarks. The other converted subscription plan quotas into actual usage and concluded it was “actually more expensive.”

    The two conclusions conflict because they use different comparison baselines. The first compares the listed price per token; the second compares how much real usage a fixed monthly fee buys. To judge whether the price is reasonable, you first need to unpack the billing structure.

    2. Breaking Down the Billing Structure: Three-Tier Pricing and Cache Economics

    Most mainstream LLM APIs use three-tier billing: input tokens, output tokens, and cache-hit tokens. The unit prices can differ by an order of magnitude, with cache-hit pricing typically a fraction of the input price. This is not a marketing design; it directly reflects the cost structure of inference.

    • The input stage requires full prefill. Attention computation grows quadratically with context length, making compute and memory bandwidth consumption highest here.
    • The output stage performs token-by-token autoregressive decoding. Each step is small but cannot be parallelized, so the cost shows up more in time occupancy and memory residency.
    • A cache hit means the prefix KV cache can be reused directly, eliminating repeated prefill and making the marginal cost extremely low.

    This leads to a conclusion that is critical for cost estimation: scenarios with long contexts, fixed system prompts, and repeated multi-turn prefixes will see their effective average price pulled down significantly by caching. Scenarios with short inputs, long outputs, and frequently changing prefixes get almost no cache benefit, and the average price will approach or even exceed the listed price. The claim that “average consumption per task is close to a certain overseas flagship model” is essentially determined by task shape, not by unit price alone.

    A simplified cost estimation logic can be written as:

    1. def estimate_cost(in_tok, out_tok, cached_tok,
    2. p_in=20, p_out=100, p_cache=1):
    3. # Unit: CNY per million tokens
    4. return (in_tok * p_in + out_tok * p_out + cached_tok * p_cache) / 1e6

    3. Why a Price Increase Does Not Necessarily Mean Higher Cost: Three Common Estimation Mistakes

    Mistake 1: Looking only at the listed price, not the structure. If the output price rises fivefold but the workload has highly repetitive prefixes and a cache hit rate of 70–80%, the effective average price increase will be far below fivefold.

    Mistake 2: Converting subscription quotas directly into API cost. Subscription plans usually come with concurrency limits, context length caps, peak-hour queuing, and differences in accounting. Treating plan quotas as “equivalent API value” at listed prices systematically overvalues the subscription and undervalues pay-as-you-go.

    Mistake 3: Ignoring failed retries and wasted consumption. Complex tasks often require multiple rounds of sampling, validation, and retries. What counts on the bill is the sum of all attempts, not just the final successful one.

    4. Building a Reusable Cost Evaluation Framework

    Teams should compare four metrics horizontally instead of comparing unit prices:

    1. Cost per task: the average total consumption to complete a standard task, covering input, output, and cache.
    2. Cache hit rate: the share of hit tokens in total input, the most sensitive factor for long-context scenarios.
    3. Cost per unit of useful output: divide by task success rate and manual rework rate to get the price of a “truly usable result.”
    4. Peak controllability: the hidden cost of rate limiting, queuing, and timeout retries.

    In practice, use a baseline table to fix the measurement standard. When switching models, only replace the parameters to keep conclusions comparable:

    Scenario Avg Input Avg Output Cache Hit Share Cost per Task
    Code completion Low Low High Low
    Long-document QA High Medium High Medium
    Complex reasoning Medium High Low High

    5. Cost Optimization Practices for Developers

    • Fix the prefix: place system prompts, tool descriptions, and examples at the front and keep them stable to maximize cache reuse.
    • Constrain output: use structured output and explicit length limits to cut wasted tokens.
    • Tiered routing: send simple requests to smaller models and escalate only complex ones, using rules or a lightweight classifier.
    • Batching and async: use batch channels for offline tasks, trading throughput for unit price.
    • Observability: tag and measure token consumption by business dimension through logging and monitoring alerts to locate high-cost call chains.
    • Elastic capacity: run stateless inference services on a container platform and store context snapshots in object storage to avoid recomputation.

    6. How to Judge Subscription Plan Value

    The idea raised in the original text—a low-tier plan costing around 100 CNY per month for thousands of CNY in usage, and a high-tier plan costing several hundred CNY for tens of thousands of CNY in usage—is essentially about the “quota multiplier.” When evaluating, focus on three points: whether the quota multiplier covers real task consumption, whether it comes with concurrency and context limits, and whether overage billing is smooth. If the quota multiplier and cache benefits cannot both hold, the so-called product strength of “arm wrestling” is hard to sustain.

    7. Conclusion

    A fivefold price increase is only a signal. What really determines the bill is task shape, cache hit rate, and calling strategy. Developers should stop comparing unit prices and unify the measurement standard around cost per task and cost per unit of useful output. Enterprise users should bring model calls into an observability system and use tiered routing and prefix reuse to bring costs back into a controllable range. In general engineering practice on platforms such as Baidu AI Cloud, this framework can be reused directly for horizontal evaluation across different models and billing schemes.