LLM API Pricing Tiers Explained: The Cost Disparity Logic Between Input, Cache Hits, and Output

    This article analyzes the tiered pricing structure of Large Language Model (LLM) APIs, focusing on the cost disparities among cache-miss inputs, cache-hit inputs, and outputs. By examining recent pricing updates, it explores the underlying technical drivers for these cost differences, such as compute bottlenecks in the decode phase and the low marginal cost of KV cache reuse. Furthermore, it provides actionable strategies for developers to optimize API costs, including maximizing cache hit rates, structuring prompts effectively, and minimizing output token length.

    1. Starting from a Real Price List

    Recently, a model platform announced the pricing for its new generation model: 100/million tokens for output, 20/million tokens for input (cache miss), and 1/million tokens for input (cache hit). Compared to the previous generation code model (27 for output, 6.5 for input cache miss, and 1.1 for cache hit), the output price surged nearly 4x and the input price increased about 3x. This change sparked widespread discussion in the developer community. While whether the price increase is “worth it” is a valid question, a more notable aspect is the shift in the ratio structure among the three pricing tiers, which reveals the model provider’s fundamental assessment of inference costs.

    This article does not evaluate whether a specific product is too expensive. Instead, it uses these figures to dissect the tiered logic of LLM API pricing, helping readers build a transferable cost analysis framework.

    2. The Fundamentals of the Three-Tier Pricing Structure

    Mainstream LLM APIs currently adopt a three-tier pricing model:

    1. Input (Cache Miss): The part of the request that newly enters the context and cannot reuse historical KV cache, billed at full price.
    2. Input (Cache Hit): The part that exactly matches the historical request prefix and can directly reuse the KV cache, billed at a discounted price.
    3. Output: The tokens actually generated and returned by the model, usually the most expensive tier.

    Using the public data as an example:

    Version Output Input (Cache Miss) Input (Cache Hit)
    Previous Gen Code Model 27 6.5 1.1
    New Gen Model 100 20 1~2

    Two key ratios can be calculated:

    • Cache Miss/Hit Ratio: About 6x for the previous generation, widened to 10~20x for the new generation.
    • Output/Hit Ratio: About 25x for the previous generation, widened to over 50x for the new generation.

    These ratio changes reflect the provider’s cost structure and pricing strategy better than absolute prices.

    3. Technical Drivers Behind the Widening Ratios

    1. Extremely Low Marginal Cost of Cache Hits. Once the KV cache is generated during the prefill phase, subsequent requests with matching prefixes can reuse it directly without recalculation. Cache hits barely consume compute power, only utilizing GPU memory and minimal bandwidth. Therefore, the pricing ceiling for cache hits is determined by “storage cost + opportunity cost,” leading to naturally modest price increases.

    2. Output is the True Compute Bottleneck. In the decode phase, generating each token requires a complete forward pass and cannot be fully parallelized, resulting in much lower GPU utilization than the prefill phase. Additionally, new-generation models typically have larger parameter scales and longer reasoning chains, simultaneously increasing the FLOPs and memory bandwidth pressure per token. The sharp price increase for the output tier is essentially a direct transmission of compute costs.

    3. Long Contexts Amplify Structural Differences. In Agent and programming scenarios, a conversation’s context can easily reach hundreds of thousands of tokens, while the output is often only a few thousand. When the input proportion is extremely high, providers have a strong incentive to use a pricing structure of “ultra-low cache hit + high cache miss” to guide users to optimize the stability of their prompt prefixes. This improves the overall cache hit rate and dilutes the provider’s service costs.

    4. Cost Implications and Developer Strategies

    1. Re-evaluate Actual Unit Prices Using Hit Rates. A 3x increase in nominal input price does not mean a proportional increase in actual costs. You can estimate the weighted cost:

    1. Effective Input Price = Cache Hit Price * Hit Rate + Cache Miss Price * (1 - Hit Rate)

    Assuming an 80% hit rate, the new generation model’s effective input price is about 1 * 0.8 + 20 * 0.2 = 4.8/million tokens. This is only about 1.3x higher than the previous generation’s ~2.1, far below the nominal increase.

    2. Design Structured Prompts to Improve Hit Rates. Best practices include:

    • Placing stable content like system prompts, tool definitions, and long-term memory at the very beginning of the context, keeping them byte-for-byte identical.
    • Postponing or separating dynamic content (timestamps, random IDs, real-time user data) as much as possible.
    • Using append-only concatenation for multi-turn conversations to avoid rearranging historical messages, which invalidates the prefix.

    3. Controlling Output Length is the Biggest Cost-Saving Lever. The output/hit ratio has reached 50x, meaning saving one generated token is equivalent to saving 50 hit input tokens. You can compress output volume by constraining output formats, requiring concise answers, or switching to lightweight models for non-critical tasks.

    4. Establish a Cost Regression Mechanism. Embed token metering in your CI/CD pipeline to baseline input, output, and hit rates for typical tasks. This allows you to quickly assess cost curve shifts when models or pricing structures change.

    5. A Rational View on Price Increases

    From an industry perspective, price hikes for flagship models often correspond to capability leaps: deeper reasoning capabilities mean fewer rounds are needed per task and success rates improve, so end-to-end costs may not necessarily rise. Developers should evaluate based on “cost per task” rather than “price per token.” If a new model can replace three calls plus manual corrections from an old model in a single call, a 5x unit price might actually be a price reduction.

    Conclusion: The core signal of this pricing adjustment is that “caching has become unprecedentedly cheap, while generation has become relatively expensive.” For users, the optimization direction is clear—maximize prefix reuse and minimize invalid output. Those who can push hit rates up and pull output lengths down will maintain a cost advantage under this new pricing structure.