LLM API Pricing Increased 5x: The Cost Logic Behind It

    This article breaks down why a 5x increase in LLM API unit prices does not necessarily mean a 5x increase in your bill. It explains how input, output, and cache-hit tokens are priced differently, why plan multipliers matter more than sticker prices, and how to model task consumption. It also provides a practical checklist for reducing costs through prefix caching, routing, and usage monitoring.

    1. The Phenomenon: Why a 5x Unit Price Increase Is Not the Whole Story

    The industry has recently seen a new round of price adjustments. For a general-purpose LLM service, the new generation’s output unit price is roughly five times that of the previous generation, while the input side has also risen noticeably. Cache-hit pricing, however, remains extremely low. Most developers’ first reaction is “it got more expensive,” but comparing unit prices alone can easily lead to the wrong conclusion.

    The reason is that a real request’s bill consists of three parts, not a single number:

    1. Cost per request = input tokens × input unit price
    2. + output tokens × output unit price
    3. + cache-hit tokens × cache unit price
    4. + uncached input tokens × input unit price

    The cache-hit unit price is usually only a fraction of the input unit price. This means that as long as a request contains a large amount of reusable system prompts, long document prefixes, or code context, the actual average cost is significantly reduced. A 5x increase in unit price and a 5x increase in the bill are two completely different propositions.

    2. Cost Structure Breakdown: The Pricing Design Behind Three Token Types

    Input-side pricing corresponds to the computation and GPU memory usage during the prefill stage. In long-context scenarios, input tokens often far outnumber output tokens, so even a small change in input unit price gets amplified.

    Output-side pricing corresponds to token-by-token autoregressive decoding. Computation cannot be parallelized, making it the main source of latency and compute costs. It is common across the industry for output unit prices to be higher than input unit prices. The larger increase on the output side of the new generation typically reflects real changes in inference compute and service quality (longer chains of thought, higher concurrency guarantees).

    Cache-hit pricing is the most underestimated lever in cost optimization. It reuses the computation results of repeated prefixes and only charges for the new portion. In engineering practice, you should place stable, unchanging content at the front as much as possible:

    1. [System instructions + tool definitions + domain knowledge] ← stable prefix, aim for cache hits
    2. [Conversation history/retrieved snippets] ← semi-dynamic
    3. [Current user input] ← dynamic, always charged

    Once the order is reversed, the prefix hash changes, the cache is invalidated, and the bill can multiply.

    3. Plan Leverage: The Multiplier Truly Determines Cost-Effectiveness

    The core insight is this: whether a service is cost-effective depends not on the sticker price, but on the “multiplier between the sticker price and the usable quota.”

    1. Effective multiplier = deductible usage within the plan ÷ plan price
    2. Converted unit price = plan price ÷ estimated monthly consumption quota

    If a plan’s multiplier is only just over 10x, while similar services generally offer 20x or more, then under the same task consumption, the former’s actual spending will be several times higher. When evaluating, use a consistent baseline: convert all options into “how much it costs to complete 100 standard tasks,” rather than comparing monthly fees.

    Also watch out for two types of bias: first, the advertised quota is calculated based on the input side, so output-heavy workloads will exhaust it faster; second, quotas have expiration dates and concurrency limits, so idle capacity is wasted.

    4. Task Consumption Modeling: Turning Bills into Predictable Variables

    Teams are advised to build their own task profiles, using sampling statistics to derive average input, output, and cache-hit ratios:

    1. def estimate_monthly_cost(tasks, avg_in, avg_out, avg_cache_ratio,
    2. p_in, p_out, p_cache):
    3. total = 0.0
    4. for _ in range(tasks):
    5. cached = avg_in * avg_cache_ratio
    6. fresh = avg_in - cached
    7. total += fresh * p_in + cached * p_cache + avg_out * p_out
    8. return total

    For workloads centered on AI agents, code generation, and long-document analysis, per-task consumption is often several times that of ordinary Q&A, with a high output proportion. These scenarios are most sensitive to output unit prices and most dependent on cache hit rates. Raising the hit rate from 20% to 70% usually brings more direct savings than switching providers.

    5. Cost Optimization Checklist

    • Place stable prefixes at the front and fix templates; avoid timestamps and random IDs entering the prefix;
    • When using retrieval augmentation, control snippet length and sorting stability to reduce prefix jitter;
    • Compress conversation history, using summaries instead of full replays;
    • Use batch processing and asynchronous queues for offline-capable tasks to smooth out peaks and fill valleys;
    • Establish usage and cost monitoring alerts by business dimension, and set budget thresholds;
    • Implement tiered routing between small and large models: sink simple requests, escalate complex ones;
    • Unify the abstraction layer for API calls to avoid tight coupling between business code and a single service, preserving room to switch.

    When deploying in the cloud, you can combine container platforms to host inference gateways, message queues for request buffering, object storage for corpus storage, and logging and monitoring services for usage attribution. These are all general capability categories and do not point to any specific product.

    6. Conclusion

    Price adjustments themselves are not a basis for judgment. What developers should do is three things: confirm the input/output and cache structure of their own workloads, calculate real task consumption and effective multipliers, and then use engineering means to optimize cache hit rates and routing strategies. Only when the converted per-task cost enters a reasonable range can you talk about competing head-to-head with external options; otherwise, even the lowest sticker price may lose its meaning due to an insufficient multiplier.