Understanding Cache Pricing Behind Large Model API Price Increases

    This article breaks down why a recent large model API price adjustment looks like a blanket increase on the surface but is actually a redesign of the ratios between billing tiers. It explains the three input/output pricing tiers, shows how to calculate your real effective cost per million tokens using input-to-output ratio and cache hit rate, and demonstrates why cached-heavy enterprise workloads and scattered low-hit developers are affected very differently. It also covers why vendors widen these ratios and lists practical engineering steps to raise cache hit rates from around 20% to 90%.

    1. The Trigger: A Price List That Looks Like a Blanket Increase

    After a coding tool vendor published pricing for its next-generation model API, the community filled with discussions about prices rising several times over. Putting the old and new generations side by side, the facts look roughly like this (CNY per million tokens, illustrative values):

    Billing tier Previous generation New generation Multiple
    Output 27 100 ≈3.7x
    Input (cache miss) 6.5 20 ≈3.1x
    Input (cache hit) 1.1 2 ≈1.8x

    Taken at face value, the conclusion seems obvious: everything went up, and output rose the most. But the number that actually matters is not the absolute multiple. It is that the relative ratios between tiers were deliberately redesigned:

    • Cache miss input / cache hit input: widened from about 6x to 10x;
    • Output / cache hit input: widened from about 25x to 50x.

    In other words, the new pricing amplifies the economic weight of whether a prefix is reused. The cache hit tier saw the mildest increase, while the miss and output tiers absorbed nearly all of it. This is not a simple price hike but a rebalancing of the billing structure.

    2. Breakdown: What Each of the Three Tiers Actually Pays For

    To understand the change, first split token billing into three tiers with clear physical meaning.

    1. Cache miss input: the model must run a full forward pass, and compute cost scales roughly linearly with sequence length. This is the most expensive real computation.
    2. Cache hit input: the intermediate state of the prefix (KV Cache) is reused, eliminating most of the repeated computation. Only attention reads and computation for new tokens remain, so cost can be an order of magnitude lower.
    3. Output: generated autoregressively token by token, with no parallelism and no reuse. Every new token requires an attention pass over the full sequence, making this the most rigid and hardest-to-optimize cost.

    This leads to a key conclusion: output cost is a rigid floor, while input cost is an optimizable item. Any cost optimization is fundamentally about shrinking the share of cache miss input, whereas the output side can realistically only be improved by controlling generation length.

    3. Modeling: Two Variables That Determine Your Real Unit Price

    Let the input-to-output ratio be r (input tokens / output tokens) and the cache hit rate be h:

    1. effective input price = hit_price * h + miss_price * (1 - h)
    2. blended price = (r * effective input price + output_price) / (r + 1)

    Plugging in both generations of prices, consider two typical workloads.

    Scenario A: enterprise long-context agent (r≈20, h≈0.9)

    1. input side ≈ 2*0.9 + 20*0.1 = 3.8
    2. blended ≈ (20*3.8 + 100) / 21 ≈ 8.4 CNY per million tokens

    Scenario B: scattered calls from an individual developer (r≈5, h≈0.2)

    1. input side ≈ 2*0.2 + 20*0.8 = 16.4
    2. blended ≈ (5*16.4 + 100) / 6 ≈ 30.3 CNY per million tokens

    Same model, same price list, yet blended cost differs by roughly 3.6x between the two workloads. Applying the previous generation’s prices under the same assumptions, Scenario A lands at about 4.3 CNY, an increase of roughly 1.9x; Scenario B lands at about 22.6 CNY, an increase of roughly 1.3x. A’s multiple is actually higher, but because its base is low, its absolute cost remains far below B’s.

    This explains a counterintuitive pattern: the customers facing the largest multiple on the price list do not necessarily feel the largest bill increase. The real pressure from this repricing falls on individual users who never benefited from caching. The claim of a “5x increase” comes from averaging the mildest hit tier together with the steepest output tier.

    4. Why Vendors Widen the Ratios

    From an engineering standpoint, the design has three justifications:

    • Cost alignment: cached requests genuinely consume far less compute, so using price signals to reflect resource consumption tracks the cost curve more closely than a flat rate;
    • Load steering: amplifying the benefit of prefix reuse uses price as a lever to encourage callers to restructure how they invoke the API, reducing repeated computation across the cluster;
    • Architectural premise: widely used approaches such as disaggregated inference split prefill and decode into separate resource pools, allowing prefix state to be shared across requests. This significantly raises the engineering ceiling on hit rates, which is what makes a high ratio workable in practice.

    High hit rates are not automatic, though. They depend on cooperation from the calling side, which is the focus of the next section.

    5. Practice: Engineering Steps to Raise Hit Rate from 20% to 90%

    1. Prefix layering and stabilization: split the prompt into a stable layer (role setup, tool descriptions, guidelines), a semi-stable layer (knowledge snippets), and a volatile layer (user input). Keep the order fixed and put volatile content last. Any timestamp, random ID, or unordered set placed earlier will invalidate the entire prefix.
    2. Deterministic template rendering: avoid injecting volatile content such as datetime.now(), randomly ordered candidate sets, or raw floats into the system section. When dynamic information is needed, inject it later via placeholders.
    3. Append to conversation history rather than rewriting it: in multi-turn scenarios, keep the historical prefix byte-for-byte identical and only append to the tail, so the entire history keeps hitting the cache.
    4. Batch and concurrency orchestration: aggregate multiple requests sharing the same prefix into coordinated scheduling to reduce repeated cold-start prefill.
    5. Output length governance: structured output, constrained decoding, and explicit length limits directly lower rigid cost.
    6. Cost observability: instrument logs, services, and alerting to track the three tiers (hit / miss / output) separately, and turn hit rate and blended unit price into dashboard metrics instead of watching only the total bill.

    Illustrative metric definitions:

    1. hit_ratio = cached_input_tokens / total_input_tokens
    2. cost_per_m = (r * (p_hit*hit_ratio + p_miss*(1-hit_ratio)) + p_out) / (r + 1)

    6. Conclusion

    The real meaning of this price adjustment is not an across-the-board increase but a shift in billing structure from coarse to fine-grained: the hit tier is subsidized, the output tier is rigid, and the miss tier is penalized. For callers, cost competitiveness has moved from “which model to choose” to “how to organize requests.” Making prefix stability, hit rate, and output length part of everyday engineering metrics is the only path that converts a higher list price into an actual discount. Otherwise, the old habit of randomly concatenating prompts means paying a persistent premium under the new billing model.