Why LLM API Prices Drop: The Cost Logic Behind Token Billing

    This article explains why a larger token volume can lead to a lower bill after an LLM API discount and a permanent cache price cut. It breaks the total cost into a vector of input, output, cache-hit, and cache-write charges, shows why cache pricing has the largest leverage, and offers practical ways to raise cache hit rates through prompt structure. It also covers budget, routing, and fallback mechanisms, plus a neutral vendor-selection checklist for keeping costs predictable when prices change.

    1. The Phenomenon: A Bill That Gets “Cheaper the More You Use” Is Not a Contradiction

    A pattern worth watching has emerged in the industry: a large model service launched a limited-time discount while permanently lowering its cache pricing. One developer recorded that the same model consumed millions of tokens at a relatively high cost on launch day; after the discount went live, consumption rose but the cost dropped noticeably; after the cache price was cut further, consumption doubled again while the cost fell to a very low level.

    This is not a billing system error. It is the result of three variables changing at the same time: a unit-price discount, a lower-priced tier brought by cache hits, and a shift in request structure from “repeated cold starts” to “high reuse.” Understanding how these three effects stack is the prerequisite for accurate cost budgeting.

    2. Breaking Down the Billing Structure: Treat the Bill as a Vector, Not a Scalar

    The cost of most inference services can be abstracted as:

    1. Total cost ≈ Σ(input tokens × input unit price)
    2. + Σ(output tokens × output unit price)
    3. + Σ(cached tokens × cache unit price)
    4. + Σ(cache write tokens × cache write unit price)

    The key point is that the input side does not have a single price. The portion that hits the cache is usually billed at a significantly lower price, the portion that misses is billed at the standard price, and the act of writing to the cache may itself be charged separately. So “number of tokens consumed” and “cost” are not linearly related, and the “average unit price” obtained by dividing total tokens by total cost has only retrospective statistical meaning and cannot be used for forecasting.

    From an engineering standpoint, log structured records for every call, containing at least: request identifier, input/output token counts, cached token count, cache write token count, price tier, and timestamp. Only with these fields can you perform attribution analysis.

    1. {
    2. "request_id": "r-8f21",
    3. "prompt_tokens": 12000,
    4. "cached_tokens": 11400,
    5. "cache_write_tokens": 0,
    6. "completion_tokens": 800,
    7. "price_tier": "discount",
    8. "ts": "2026-04-27T10:12:03Z"
    9. }

    3. Why the Cache Price Cut Has the Largest Impact

    In scenarios such as intelligent coding tools, conversational assistants, and document analysis, request prefixes are highly repetitive: system prompts, tool definitions, project context, and long document bodies often stay unchanged across consecutive turns. This means there is a large amount of “reusable prefix” on the input side.

    The leverage of a cache price cut comes from two factors: cacheable tokens make up a high share of total input, and the price reduction on that portion multiplies directly onto the largest term. When the hit rate rises from a low level to above 90%, input cost can drop by an order of magnitude. This is the intuitive source of “the more you use, the less you spend.”

    Note that cache hits do not happen automatically. They usually depend on three conditions: the prefix is exactly identical, the interval between calls falls within the cache validity period (commonly on the order of minutes), and capacity eviction has not been triggered. If any one of these is not met, the request falls back to the standard price.

    4. Making Hit Rate an Optimizable Metric

    Improving the hit rate starts with how requests are constructed. The core principle is “stable prefix first, volatile content last”:

    1. Keep the system prompt and tool descriptions fixed, and avoid embedding timestamps, random identifiers, or session IDs in them.
    2. Place long context (codebase summaries, specification documents) at the front of the prompt and user input at the end.
    3. Avoid modifying the prefix midway through a session; when a change is truly needed, append it to the tail instead of rewriting the head.
    4. Control concurrency pacing so that consecutive requests sharing the same prefix land within the validity period, reducing “just expired, then rewritten” cases.
    5. Group batch tasks so that tasks sharing a prefix run within the same time window.

    An illustrative structural comparison:

    1. High-hit structure: [fixed system prompt][fixed tool definitions][fixed long context] + [current user input]
    2. Low-hit structure: [timestamp][session ID][system prompt][randomly ordered tool definitions] + [user input]

    5. Cost Governance: Budgets, Routing, and Fallback

    Discounts are limited-time and cache price cuts are long-term; stacking the two can distort short-term bills. A three-layer mechanism is recommended:

    • Budget layer: set daily/per-project quotas and alert thresholds, and use monitoring and alerting capabilities to flag abnormal consumption.
    • Routing layer: split traffic by task difficulty, sending simple completions to a lightweight model and complex reasoning to a more capable model, avoiding across-the-board expensive calls.
    • Fallback layer: when the budget approaches the threshold, automatically shorten context, disable unnecessary cache writes, and reduce concurrency.

    Pseudocode example:

    1. def choose_model(task):
    2. if task.kind in ("completion", "format"):
    3. return "light"
    4. if task.needs_long_context and task.budget_left > 0.3:
    5. return "pro"
    6. return "light"

    6. A Neutral Selection View: Look Beyond Unit Price

    Price is only one evaluation dimension. Engineering selection should also examine service stability and availability commitments, whether rate-limiting policies are predictable, whether cache semantics are transparent (whether validity periods and hit rules are clearly stated), observability support (logs, metrics, tracing), data compliance and isolation capabilities, and whether vendor lock-in risk exists.

    Cost-sensitive teams can adopt a multi-vendor strategy of “one primary, one backup,” using a unified gateway layer for abstraction and consolidating prompt templates, cache strategies, and billing statistics on their own side, so they can switch quickly whenever any vendor changes prices. If using general cloud capabilities, object storage can hold context material, message queues can smooth request spikes, container platforms can host the gateway, and logging and monitoring services can support cost attribution.

    7. Conclusion

    Limited-time discounts bring short-term gains, while permanent cache price cuts change the long-term cost curve. What truly determines the bill is request structure and hit rate, not the list price. Only by breaking billing into a vector, turning hit rate into a metric, and making budgets and routing into mechanisms can you keep costs predictable amid price fluctuations.