Why LLM API Costs Jumped 5x: Token Pricing, Caching, and Cost Control

    A practical breakdown of why a new generation of large models can cost roughly five times more per token, how input, output, and cache-hit tokens are priced differently, why subscription quotas often matter more than list price, and how task tiering plus context governance keep spending under control. Includes cost estimation and routing examples, a real quota-consumption table, and a checklist for tracking equivalent task cost.

    1. The Signal: A 5x Price Jump That Still Makes Sense

    A pattern worth watching has appeared in the industry: a new generation of larger-parameter models charges roughly five times more per unit of usage than the previous generation. Output sits in the range of 100 RMB per million tokens, input around 20 RMB, and cache-hit tokens only around 1 RMB. At the same time, a different technical path is doing the opposite: parameters keep growing while unit price drops significantly.

    Placed side by side, these two facts are not contradictory. They show that “model price” is no longer a single-dimension question. Price is determined by four variables together: parameter count and inference compute overhead, context length, cache reuse capability, and how the vendor prices high-end capability. As parameters move from the trillion scale to the multi-trillion scale, attention computation and memory bandwidth pressure rise non-linearly, and KV cache occupancy in long-context scenarios pushes up the cost of a single request directly. So “bigger and stronger, therefore more expensive” holds up in inference economics.

    But what users should actually care about is not the unit price. It is the equivalent cost of completing a real task. Unit price is a standard, a frame of reference, not the bill.

    2. Breaking Down the Pricing Structure: Three Kinds of Tokens

    The first step to understanding a bill is separating three token types:

    • Input tokens: billed at full price, one of the main cost drivers;
    • Output tokens: usually far more expensive than input, because the generation phase is token-by-token autoregressive and cannot be parallelized;
    • Cache-hit tokens: as low as roughly one twentieth of the input price, and the most important cost-reduction lever for repeated calls in long-context scenarios.

    The cost estimation logic can be sketched as:

    1. def estimate_cost(in_tok, out_tok, cached_tok,
    2. p_in=20, p_out=100, p_cache=1):
    3. # unit: RMB / million tokens
    4. return (in_tok * p_in
    5. + out_tok * p_out
    6. + cached_tok * p_cache) / 1_000_000

    Key takeaway: in long-context, multi-iteration tasks, the cache hit rate often determines the final bill more than unit price does. A session whose hit rate rises from 20% to 70% can cost several times less, which beats switching to any other model.

    3. Subscription Quotas Are the Real Unit of Cost

    Individual developers can almost never sustain metered API consumption over the long run. A common industry pattern: once a high-end model’s API unit price is converted into subscription usage, a package in the twenty-dollar range may correspond to hundreds of dollars’ worth of API usage, and a package in the two-hundred-dollar range may correspond to usage in the tens of thousands of dollars. In other words, subscription pricing carries a one-to-two order-of-magnitude leverage over metered billing.

    So when evaluating a coding package, look at its quota structure rather than the sticker price. A typical mid-tier package (in the 199 RMB range) measured roughly as follows:

    Observation Measured result
    Single task duration About 5 hours
    5-hour rolling quota consumed 63%
    Weekly quota consumed 13%
    Context occupancy 226k (about 13%)
    Conversion Weekly quota ≈ 5 five-hour quotas

    Task scale for reference: 88,211 lines in total, of which 28,543 are frontend, and the task type was UI/UX refinement (including planning, build, and commit phases) rather than a full rewrite.

    This leads to a practical conclusion: a mid-tier package is reasonably positioned as one deep optimization pass on your project per day. Anything beyond that exceeds what the quota was designed for. If the goal is “high-frequency refactoring,” it simply does not match at that price point.

    4. Task Tiering: Spend the Expensive Model on the Hardest Problems

    The core of cost optimization is not saving money. It is assigning high-unit-price capability to high-value tasks. A recommended three-tier structure:

    1. Plan tier: needs strong reasoning and global architecture judgement; use a high-capability model, where token consumption is small but value density is high;
    2. Build tier: mechanical code generation and edits; use a cost-effective model or a small local model, high volume at low price;
    3. Verify tier: compilation, unit tests, and static checks kept local as much as possible, never sent to a model.

    A pseudocode version of the dispatch strategy:

    1. def route(task):
    2. if task.needs_arch_judgement:
    3. return "flagship_model" # expensive, but only at key points
    4. if task.is_mechanical_edit:
    5. return "cost_effective_model"
    6. return "local_lint_and_test" # zero model cost

    Layered on top of this structure, add context governance: feed only relevant files instead of the whole repository, summarize long documents before putting them into context, and keep the system prompt and project conventions stable to improve cache hits. These three usually deliver a larger cost benefit than “switching to a cheaper model.”

    5. Selection Judgement and Common Mistakes

    • Already on a high-end subscription: no need to buy a mid-tier package as well, unless frontend experience requirements are extremely high;
    • Using a cost-effective main model: a high-end package can serve as a dedicated “daily deep-dive” quota;
    • Mistake 1: deciding on API unit price alone and ignoring subscription leverage;
    • Mistake 2: overlooking the weight of output tokens; in long-form generation, the output side is the main cost;
    • Mistake 3: no cache reuse, so every round of a long context is recomputed at full price;
    • Mistake 4: treating benchmark rankings as equivalent to production readiness while ignoring latency. High-end reasoning models are generally “slow,” and in interactive development latency is itself a hidden cost.

    6. An Actionable Cost Governance Checklist

    1. Keep a token ledger: record input, output, and cache-hit usage per session;
    2. Set a quota budget: split the weekly quota into two buckets, “daily deep-dive” and “routine iteration”;
    3. Keep the context prefix stable to maximize cache hits;
    4. Route tasks by tier so mechanical work does not consume high-end quota;
    5. Localize the verification stage to cut wasted model round trips;
    6. Review equivalent task cost regularly, not unit price.

    7. Closing

    A fivefold jump in unit price is not the problem itself. Using a model at the wrong tier is the root cause of runaway cost. Once the pricing structure, the caching mechanism, and the subscription quota conversion are all worked out, task tiering and context governance keep costs controllable through a capability upgrade cycle. If you need unified model access, logging and monitoring alerts, and elastic compute support, Baidu AI Cloud’s general-purpose capabilities can be used to build an observable, auditable AI engineering system.