Decoding Cache Pricing Behind the Latest LLM API Price Increase

    A breakdown of how tiered LLM API pricing, prefix caching, and hit rates affect real per-token costs, plus a practical checklist for reducing them.

    1. Break Down the Price List First: Which Tiers Actually Went Up

    After a new-generation general-purpose LLM published its API pricing, a claim spread through the community that prices had risen “fivefold across the board.” Splitting the price list by tier tells a more nuanced story. Taking a previous-generation model aimed at coding scenarios as the reference: the output tier moved from 27 CNY to 100 CNY per million tokens, roughly 3.7x; uncached input went from 6.5 CNY to 20 CNY, and cached input from 1.1 CNY to 2 CNY, both around 3x. The cached-input tier saw the smallest absolute increase, while the output tier rose the sharpest.

    The change in the ratio structure is more telling than absolute prices, because it reveals the vendor’s intent:

    Ratio Previous generation New generation
    Uncached input / cached input ~6x 10x
    Output / cached input ~25x 50x

    Both ratios widening at once amounts to a single statement: the vendor has shifted the pricing center of gravity from “number of tokens” to “whether the context can be reused.” Cached input is pushed to an extremely low price, while uncached input and all output carry the bulk of the per-token cost.

    2. Why Vendors Can Price This Way: Disaggregated Inference and Prefix Reuse

    This kind of pricing is not arbitrary. Mainstream inference serving architectures have long split a request into two phases: prefill (processing the input and building the KV cache) and decode (generating tokens one by one). Prefill is compute-intensive, cacheable, and shareable across requests; decode is memory-access-intensive and almost impossible to reuse. Disaggregated inference places the two phases in separate resource pools, making the cache hit rate an operable metric. Combined with global prefix caching and KV cache reuse, hit rates above 90% are engineering-achievable for coding workloads with long system prompts, fixed tool definitions, and long code-repository context.

    The vendor’s subtext is clear: if your workload is naturally highly reusable, you are billed at the cached rate and effectively receive a discount; if you change the prompt every time, you consume the most expensive uncached input plus full-price output, which means paying list price or even a premium.

    3. Two Scenarios, Two Real Unit Costs

    Let the input-to-output ratio be r, the hit rate be h, the cached price p_hit, the uncached price p_miss, and the output price p_out. Then:

    1. effective input unit price = h * p_hit + (1 - h) * p_miss
    2. blended unit price = (r * effective input unit price + p_out) / (r + 1)

    Scenario A: enterprise coding agent, r=20, h=0.9. Input side ≈ 2×0.9 + 20×0.1 = 3.8 CNY, blended ≈ (20×3.8 + 100)/21 ≈ 8.4 CNY per million tokens.

    Scenario B: individual developer, r=5, h=0.2. Input side ≈ 2×0.2 + 20×0.8 = 16.4 CNY, blended ≈ (5×16.4 + 100)/6 ≈ 30.3 CNY per million tokens.

    Same model, same price list, roughly a 3.6x difference in unit cost. The takeaway is not “the price went up” but “pricing is now tiered”: high-reuse workloads get the discounted rate, low-reuse workloads bear list price and a premium.

    4. An Optimization Checklist

    1. Put fixed prefixes first: place the system prompt, tool schemas, few-shot examples, and repository notes at the very front, and avoid volatile concatenation such as timestamps or random IDs.
    2. Append within a session instead of rewriting: keep the prefix strictly identical across turns in a multi-turn conversation, and avoid reordering history each turn, which invalidates the cache.
    3. Control output length: output is the only tier with no discount, so structured output, a capped max tokens, and avoiding verbose explanations pay off directly.
    4. Measure before choosing: use logging services and monitoring alerts to track the actual hit rate and input-to-output ratio, then plug them into the formulas above to make a selection, rather than deciding from the sticker price.
    5. Carry it with general-purpose cloud capabilities: object storage for long-context material, a container platform for the inference gateway, a message queue for peak shaving, and monitoring with alerting to form a cost dashboard; the relevant Baidu AI Cloud product categories can serve as a deployment reference.

    In one sentence: understand the three pricing tiers and the two ratios, and you can plug your own workload into the formula to judge whether this adjustment is a discount or a markup for you.