Understanding LLM API Price Hikes: Cache Hits Determine Your True Cost

    New-generation LLM APIs have seen significant price increases, but the sticker price does not reflect your actual expenditure. This article breaks down the cost logic behind tiered pricing based on cache hits, misses, and outputs, and provides a practical calculation method to estimate real costs and optimize API usage.

    The list prices for next-generation large language model (LLM) APIs are several times higher than their predecessors, with output prices approaching 4x the original rates. However, the sticker price alone does not reveal your true cost. The price hikes vary across cache hit, cache miss, and output tiers. Your actual expenditure depends on your application’s cache hit rate and input/output (I/O) ratio. This article deconstructs the cost logic of this tiered pricing and offers a calculation method you can apply to your own use cases.

    1. Comparing the Old and New Price Tables

    Here is a representative price table (in CNY per million tokens):

    Tier Previous Gen New Gen Increase
    Cache Hit Input 1.1 2 ~1.8x
    Cache Miss Input 6.5 20 ~3.1x
    Output 27 100 ~3.7x

    All three tiers have seen price increases, but at different rates. The cache hit tier has the mildest increase, while the output tier has the steepest. The shift in two key ratios highlights the direction: the ratio of miss-to-hit input prices has expanded from roughly 6x to 10x, and the output-to-hit input ratio has grown from about 25x to 50x. This widening gap indicates that vendors are more explicitly rewarding prefix reuse while charging higher fees for long-context consumption without reuse.

    2. Why is the Cache Hit Tier Priced So Low?

    The cost of a single inference request primarily consists of three parts:

    • Weight reading: Model parameters reside in GPU memory (VRAM) as a fixed cost, amortized across each request.
    • Prefill: Parallel computation of input tokens to generate the KV Cache.
    • Decoding: Token-by-token generation of output, constrained by memory bandwidth, which is the most resource-intensive in long-context scenarios.

    The KV Cache is critical. In traditional architectures, KV Cache and computation share the same GPUs; the longer the context, the faster the memory and bandwidth consumption grow. Disaggregated inference architectures place the KV Cache in an independent cache pool. Combined with prefix matching, this ensures identical prefixes are computed only once. This is a common industry approach, though specific implementations vary by vendor.

    When a cache hit occurs, it bypasses the repetitive prefill computation, significantly reducing compute overhead, allowing the price to be lower than the miss tier. However, it is not zero-cost. The storage, reading, scheduling, and bandwidth of the KV Cache still incur expenses. A hit price of 2 reflects the lower marginal compute cost. The vendor’s specific profit margins cannot be deduced from public prices.

    When utilizing caching, note three key points:

    • Prefixes must match exactly. An extra space or a changed order in tool definitions can result in a cache miss.
    • Caches have a Time-to-Live (TTL) and capacity limits. Expired or evicted caches require recalculation.
    • Cross-session and cross-node reuse depend on deployment methods; do not assume a hit every time.

    The assumed hit rate also needs context. Industry discussions suggest that coding scenarios can achieve very high prefix reuse rates. This article uses a 90% hit rate as an assumption in Section 3; this is not official vendor data.

    3. Calculating the Costs in Two Scenarios

    Before calculating, let’s standardize the metrics: cache miss input is 20, hit input is 2, and output is 100 (in CNY per million tokens). This calculation excludes batch processing discounts, concurrency limits, and cache storage fees. Always refer to official vendor pricing for actual costs.

    The calculation has two steps. First, calculate the weighted input price:

    Input Price = Hit Rate × Hit Price + (1 − Hit Rate) × Miss Price

    Second, weight this by the I/O ratio to get the composite price. Assuming an I/O ratio of 20 (meaning 20 input tokens for every 1 output token):

    Composite Price = (I/O Ratio × Input Price + 1 × Output Price) / (I/O Ratio + 1)

    Scenario A: Enterprise Coding Agent

    Assuming a high proportion of fixed system prompts, repetitive code read/writes, an I/O ratio of 20:1, and a 90% hit rate.

    • Input Price = 2 × 0.9 + 20 × 0.1 = 3.8 CNY
    • Composite Price = (20 × 3.8 + 1 × 100) / 21 ≈ 8.4 CNY per million tokens

    Scenario B: Low-Reuse Individual Developer

    Different prompts every request, an I/O ratio of 5:1, and a 20% hit rate.

    • Input Price = 2 × 0.2 + 20 × 0.8 = 16.4 CNY
    • Composite Price = (5 × 16.4 + 1 × 100) / 6 ≈ 30.3 CNY per million tokens

    For the same model, the unit cost in Scenario B is about 3.6 times that of Scenario A. The sensitivity to the hit rate is also high: for every 10 percentage point drop in the hit rate, the input price increases by roughly 1.8 CNY.

    Comparing this to the previous generation: using the old prices, the composite prices for Scenarios A and B were approximately 2.85 CNY and 9.0 CNY, respectively. Scenario A saw a ~2.9x increase, while Scenario B saw a ~3.4x increase. Both are more expensive, and while high-reuse users face smaller price hikes and lower unit costs, they are still not getting a discount compared to the previous generation.

    4. Why Prices Are Rising Now: Agents Changed the Cost Model

    In conversational scenarios, the number of tokens per interaction is usually small, so price changes have a limited impact on total cost. AI Agent tasks are different. Agents perform continuous, extensive tool calls, and the context grows longer as the task progresses, consuming far more tokens than single-turn chats. While industry discussions have cited cases of massive token consumption in single agent tasks, data sources vary, so specific numbers are omitted here.

    This task pattern introduces three structural costs:

    1. Continuous context growth increases KV Cache memory consumption.
    2. Bandwidth consumption during the decoding phase rises with context length, making long tasks more expensive per unit.
    3. High persistent costs. Large model weights must reside in VRAM, and Mixture of Experts (MoE) architectures must handle expert routing communication overhead. Even if only a subset of experts is activated per request, these fixed investments remain.

    From this perspective, tiered pricing aligns billing with actual costs. Long tasks consume significantly more resources than single-turn chats, making it difficult for a unified price to cover both high-reuse and low-reuse use cases. By splitting prices into different tiers, vendors are essentially shifting the billing model from “per conversation” to “per resource consumption.” This conclusion is based on an analysis of cost structures, as vendors have not publicly disclosed relevant internal data.

    5. How Developers Should Respond

    Instead of just staring at the sticker price, adjust your API calls to minimize costs across all tiers.

    1. Maximize Prefix Reuse: Place stable content like system prompts, tool definitions, and project context at the very beginning, followed by dynamic content. Variables that change every time, like timestamps or random IDs, should never be placed at the front.
    2. Maintain Session Structure Stability: Keep prefixes consistent for continuous requests within the same task to avoid rewriting the context each time.
    3. Control Output Consumption: The output tier is the most expensive. Set reasonable output limits and break large tasks into smaller steps to avoid generating excessively long outputs at once.
    4. Build a Cost Model: Calculate your weighted composite price based on your business’s actual hit rate and I/O ratio, and use this to compare horizontally against other models or solutions. If your cloud platform offers cache hit monitoring or batch task billing, incorporate this data into your calculations, using real metrics instead of intuition based on list prices.

    Before deployment, check the following:

    • Are prefixes exactly identical, including spaces and the order of tool definitions?
    • Can you monitor the cache hit rate and review it weekly or per task?
    • Have you calculated the weighted price based on the true I/O ratio and hit rate?
    • Have you set output limits and request timeouts?

    Conclusion

    This round of price adjustments indicates that LLM API pricing is shifting from a unified rate to a tiered structure that reflects actual inference costs. The price gap for cache hits stems from the cost advantages of disaggregated inference architectures. For teams with stable prefixes and efficient cache reuse, this pricing model offers room for optimization. For individual users who only occasionally use chat features, the change in expenditure is usually minimal. Understanding the cost logic behind the pricing is far more useful than simply comparing list prices.

    Note: Pricing and architecture details may change as vendors adjust their offerings. This article is based on public discussions and representative prices.