LLM API Pricing: The Cost Logic Behind Price Hikes and a Practical Selection Guide

    This article explains why a larger parameter count does not automatically mean a higher API price. It breaks inference cost into memory usage and batching efficiency, memory bandwidth pressure, cache reuse rate, and engineering optimization, then shows how tiered cache-hit pricing, subscription quotas, and pay-as-you-go billing affect the real cost per effective token. Readers will find a practical selection checklist covering traffic sampling, sensitivity analysis, layered routing, and observability to keep LLM API costs under control.

    1. The Phenomenon: Larger Parameter Counts and Higher Unit Prices Happening Together

    A notable pattern has recently emerged in the industry. A new-generation ultra-large model has pushed its parameter count from the trillion level to nearly 3 trillion, while its API unit price has risen several times compared with the previous generation: roughly RMB 100 per million output tokens, RMB 20 per million input tokens, and RMB 1 per million cache-hit tokens. Within the same time window, a model following a different approach increased its parameter count to 1.6 trillion but lowered its unit price significantly.

    The fact that both directions appear at once shows that “larger parameters must cost more” is an intuitive misconception. To understand it, you need to separate price into two layers: cost structure and pricing strategy.

    2. Cost Structure: Why Parameter Count Is Not the Only Variable

    Inference cost is mainly made up of four parts:

    • Memory usage and batching efficiency: the parameter count determines the size of the weights, which affects how many concurrent requests a single GPU can handle. The larger the batch, the lower the compute cost amortized per token.
    • Memory bandwidth pressure: the decoding stage is memory-bandwidth intensive, and bandwidth utilization directly determines per-token latency and throughput.
    • Cache reuse rate: scenarios with high prefix repetition can skip repeated computation.
    • Engineering optimization: quantization, sparsification, operator fusion, and scheduling strategies can all significantly change the actual unit cost.

    As a result, a 1.6-trillion-parameter model with more aggressive quantization and scheduling optimization can well be cheaper than a 2.8-trillion-parameter model with conservative optimization. Price differences are first differences in engineering maturity, and only second differences in scale.

    3. Cache-Hit Billing: An Underrated Cost Lever

    Tiered pricing such as “RMB 20 for input, RMB 1 for a cache hit” essentially passes the compute cost of repeated prefixes back to the caller. The implication for engineering practice is direct: put stable, unchanging content first.

    1. [System prompt + tool definitions + domain knowledge snippets] <- stable prefix, cacheable
    2. [Conversation history] <- semi-stable
    3. [Current user input] <- changes every time

    Key implementation points:

    1. Prioritize prefix stability. Remove volatile fields such as timestamps, random IDs, and user nicknames from the system prompt; otherwise the entire prefix cache is invalidated.
    2. Order is a contract. Caching matches token by token over the prefix, so swapping the order of sections is equivalent to rewriting them.
    3. Make the hit rate observable. Use logging services and monitoring alerts to track three metrics: hit rate, average input length, and reasons for cache invalidation.
    4. Model the cost formula explicitly:
    1. cost = (in_tokens * p_in * (1 - hit_rate) + in_tokens * p_cache * hit_rate) \
    2. + out_tokens * p_out

    When the input-to-output ratio is high and prefix repetition exceeds 70%, tiered cache pricing can often offset the increase brought by a higher unit price.

    4. Subscription vs. Pay-as-You-Go: The Difference in Perceived Cost

    One sharp observation in the original discussion is that the listed API price is only a “suggested retail price”; for subscription users, the real experience is determined by quotas. The reason is that the two billing models work differently:

    • Pay-as-you-go: linear and predictable, suitable for scenarios with large traffic fluctuations or a need for precise accounting.
    • Subscription quota model: a quota pool that resets weekly or monthly. If different capabilities (such as chat and code execution) are counted in separate pools, heavy users can easily exhaust their quota before the period ends, making the marginal perceived price higher than the listed price.

    When evaluating options, convert everything into “actual spend per million effective tokens,” and put the quota reset cycle, pooling rules, and burst throttling policy into the same table. Otherwise, any cross-option comparison will be distorted.

    5. Selection Checklist

    1. Start with a small-scale sample of real traffic, and measure the distribution of input and output lengths and the prefix repetition rate.
    2. Run a sensitivity analysis with the cost formula above across three cache hit-rate levels (low/medium/high).
    3. Treat stability, throttling, quota reset, and data compliance as parallel dimensions, rather than comparing unit price alone.
    4. Use layered routing: send simple requests to small models and complex reasoning to large models, which can significantly lower the average cost.
    5. On platforms such as Baidu AI Cloud, you can combine container platforms for elastic scaling, object storage for building a knowledge base, and logging and monitoring systems for cost attribution, forming a closed loop.

    6. Conclusion

    A higher unit price and a jump in scale are not in a causal relationship; the real determining factors are engineering optimization and billing structure. Developers should shift their attention from the “listed number” to the “cost per effective token,” and use three tools—cache hit rate, layered routing, and an observability system—to turn cost into a controllable variable.