Why Generative AI Model Prices Are Rising: From Cache Hits to True Costs

    The apparent price increases of next-generation generative AI models have sparked significant debate. However, API costs cannot be measured solely by base token prices. This article explores how cache hit rates, input-output ratios, and architectural design impact actual expenses. It provides detailed cost calculations, real-world usage scenarios, and practical engineering strategies to help enterprises and developers optimize their LLM expenditures.

    As advanced generative AI models are increasingly integrated into code generation, AI agents, and enterprise automation, changes in their pricing models frequently trigger discussions. A recent next-generation model introduced an output price of 100 CNY per million tokens, an input price of 20 CNY per million tokens, and a cache hit price of 2 CNY per million tokens. Compared to its predecessor, this appears to be a significant price hike.

    However, comparing individual price tiers often leads to oversimplified conclusions. The actual cost of API calls is not dictated solely by the “input unit price” or “output unit price.” It is jointly influenced by the input-output ratio, context reuse, cache hit rate, task complexity, and call chain design. For enterprise-grade AI agents, an increase in listed prices does not necessarily equate to a proportional rise in actual usage costs. Conversely, for individual developers with low context reuse, the actual cost might indeed increase significantly.

    1. Distinguishing Three Types of Prices

    To accurately understand model pricing, we must first clarify three concepts.

    First, the standard input price: the content in the current request does not trigger a cache hit and is billed at the full input token rate. Second, the cache hit price: a portion of the request content matches previously processed context. The server can reuse existing computation results, billing at a much lower rate. Third, the output price: the cost of tokens generated as new content by the model.

    Consider a typical pricing structure:

    • Previous generation model: Output at ~27 CNY per million tokens;
    • Next generation model: Output at ~100 CNY per million tokens;
    • Previous generation model input: ~6.5 CNY (uncached), ~1.1 CNY (cached);
    • Next generation model input: ~20 CNY (uncached), ~2 CNY (cached).

    In absolute terms, the new model’s output price is nearly four times that of the previous generation, the uncached input price is about three times higher, while the cache hit price has seen a relatively smaller increase. This means the price surge is not uniform; it is concentrated on the output and uncached input sides.

    We can also observe the shifting ratios between billing tiers. In the previous generation, the uncached input price was about six times the cache hit price; in the new generation, this ratio expands to around ten times. Previously, the output price was roughly twenty-five times the cache hit input price; the new model expands this to fifty times. This shift indicates that AI providers are explicitly differentiating the resource consumption between “reprocessing repeated context” and “generating entirely new content.”

    2. Why Output Prices Have Increased More Significantly

    Although both input and output are measured in tokens, they consume different computational resources.

    For input, the system primarily reads the context, establishes intermediate states, and feeds them into subsequent inference. For output, the model typically generates results token by token. Generating each new token requires continuous inference computation, relying on all previously generated content. Therefore, in scenarios involving long-text generation, complex code synthesis, multi-turn planning, and tool calls, the output phase imposes a much higher computational burden.

    This is particularly true for AI agent tasks, where the model doesn’t just answer a single query but may go through the following steps:

    1. Read system instructions and historical context;
    2. Analyze the user’s objective;
    3. Formulate an execution plan;
    4. Generate code or structured operations;
    5. Correct errors based on tool execution results;
    6. Continue reasoning and output the final result.

    During this process, the input context often contains substantial repetitive content, while the output requires continuous new reasoning. Thus, the rise in output price likely reflects the resource investment required for deeper reasoning, higher code generation quality, complex task stability, and long-chain decision-making capabilities.

    Of course, a price increase does not automatically prove that model capabilities have improved proportionally. Users must still evaluate task success rates, manual revision time, call counts, and overall delivery efficiency. The truly meaningful metric is not “cost per million tokens” but “cost to complete a successful task.”

    3. Cache Hit Rate: The Key Variable Affecting Actual Costs

    In long-context programming and enterprise AI agent scenarios, requests typically contain a large volume of relatively fixed content, such as:

    • System prompts;
    • Project directories and code indices;
    • API specifications;
    • Database schemas;
    • Business rules;
    • Historical conversations;
    • Tool definitions;
    • Task states and execution logs.

    If this content remains stable across consecutive requests, it can be reused via caching. When a cache hit occurs, the input portion is billed at a lower rate, which can significantly reduce actual costs.

    You can estimate the average input price using this formula:

    Effective Input Price = Cache Hit Rate × Cache Hit Price + Miss Rate × Miss Price

    Assuming the next-generation model has a cache hit price of 2 CNY, an uncached price of 20 CNY, and a cache hit rate of 90%, the calculation is:

    Effective Input Price = 90% × 2 + 10% × 20 = 3.8 CNY/million tokens

    Although the uncached input is priced at 20 CNY, high-reuse scenarios bring the average input cost down to roughly 3.8 CNY. This demonstrates that caching is not a marginal optimization feature but a core mechanism determining the economic viability of enterprise applications.

    It is important to note that the cache hit rate is not solely determined by the model provider; it heavily depends on the application architecture. If developers frequently modify system prompts, shuffle context order, insert dynamic content, or re-stitch entire conversation histories for every request, cache hit efficiency will degrade.

    4. Understanding True Costs Through Two Scenarios

    Scenario 1: Enterprise-Grade Long-Context AI Agent

    Assume a coding AI agent has an input-output token ratio of 20:1, meaning it reads an average of 20 input tokens for every 1 output token generated. Assume a cache hit rate of 90%.

    The average input price is:

    2 × 0.9 + 20 × 0.1 = 3.8 CNY/million tokens

    If the output price is 100 CNY, the blended cost per 21 tokens is:

    (20 × 3.8 + 1 × 100) ÷ 21 ≈ 8.4 CNY/million tokens

    This result is highly representative. Although the output price has reached 100 CNY, the high proportion of cached input brings the effective blended cost down to approximately 8.4 CNY. For enterprise applications that can reduce manual coding, testing, and debugging time, this cost may be perfectly acceptable.

    Scenario 2: Individual Developer with Low Context Reuse

    Now assume a developer occasionally calls the model with entirely different task content each time, an input-output ratio of 5:1, and a cache hit rate of only 20%.

    The average input price is:

    2 × 0.2 + 20 × 0.8 = 16.4 CNY/million tokens

    The blended cost is:

    (5 × 16.4 + 1 × 100) ÷ 6 ≈ 30.3 CNY/million tokens

    For the exact same model, different usage patterns can cause the blended unit price to rise from ~8.4 CNY to ~30.3 CNY, a difference of more than threefold. Therefore, users cannot judge usage costs based solely on public list prices; they must measure their own request structures.

    5. Easily Overlooked Cost Factors in Enterprise Applications

    Beyond token pricing, several factors can significantly inflate your bill.

    1. Repeatedly Sending Long Contexts

    Some applications resend the entire project code, full conversation history, and massive logs with every request. Even if some content triggers a cache hit, excessive dynamic content reduces reuse efficiency. A better approach is to separate stable content from dynamic content, place fixed prefixes at the beginning of the context, and eliminate irrelevant information.

    2. Overly Verbose Outputs

    The longer the model’s output, the higher the cost. In code generation scenarios, if the model is asked to output full explanations, entire file contents, detailed test reports, and multiple alternative solutions simultaneously, output tokens will spike. Production systems should constrain output scope based on task type—for example, returning only changed files, diffs, structured results, or essential error descriptions.

    3. Hidden Costs of Failure Retries

    Network timeouts, formatting errors, and tool execution failures can all trigger retries. Without a retry limit, a single request might be executed multiple times. It is recommended to log the input tokens, output tokens, cache status, failure reasons, and retry counts for each call to establish task-level cost tracking.

    4. Multi-Agent Chains Increasing Call Counts

    Complex AI agents often involve multiple steps: planning, execution, review, and repair. A single API call may be cheap, but multiple rounds of calls will cause total costs to accumulate rapidly. When designing workflows, evaluate which steps genuinely require high-capability models and which can be handled by rules, retrieval, programmatic validation, or cheaper models.

    6. Engineering Methods to Reduce Actual Costs

    First, optimize context structure. Place stable system rules, project descriptions, and tool definitions in fixed blocks. Concentrate dynamic content like user tasks and real-time logs separately, avoiding unnecessary changes to the overall prompt prefix.

    Second, control output boundaries. For code modification tasks, prioritize asking the model to return patches, file paths, structured operations, or summaries rather than repeating the entire project file.

    Third, adopt a tiered model strategy. Simple classification, format conversion, summarization, and information extraction can utilize lower-cost models. Reserve high-tier models for complex reasoning, cross-file modifications, and difficult troubleshooting.

    Fourth, establish a cost observability system. At a minimum, track the following metrics:

    • Input token count per request;
    • Output token count per request;
    • Cache hit rate;
    • Average retry count;
    • Total call count per task;
    • Blended cost per successful task;
    • Manual modification and review time.

    Fifth, replace token unit price with “cost per successful task” as your decision metric. If an expensive model completes a task in one attempt, while a cheaper model requires multiple retries and increased manual revision, the former’s total cost may actually be lower.

    7. How to Evaluate This Price Increase

    From a technical perspective, the price increase can be understood as a repricing of inference and output resources for high-tier models. The notable increase in output prices reflects a more accurate representation of the computational costs behind complex generation tasks. Meanwhile, the lower cache hit prices indicates that service providers are encouraging users to build stable, reusable long-context applications.

    From a user perspective, however, one cannot simply assume that “a high cache hit rate guarantees low costs.” If the system generates substantial output or features long call chains, output fees will likely remain the primary expense. If the cache hit rate is low, input-side costs will rise rapidly. Therefore, whether the model is worth using must ultimately be judged by combining task value, success rate, response speed, and manual time saved.

    Overall, this pricing shift sends a clear signal: the cost optimization of generative models is shifting from “choosing a cheaper model” to “designing a more efficient calling architecture.” For enterprise users, the focus should be on increasing context reuse, compressing invalid outputs, reducing redundant calls, and establishing granular cost monitoring. For individual developers, attention should be paid to task granularity, input-output ratios, and call frequency.

    A truly mature generative AI application does not blindly pursue the lowest token price, but strikes a balance among model capability, task success rate, and overall engineering cost.