Why LLM API Bills Can Differ by 2x at the Same Unit Price

    Identical per-token pricing across cloud platforms does not guarantee identical monthly bills. This article breaks down the hidden billing rules that actually shape LLM inference costs—batch discounts, subscription and credit plans, off-peak scheduling, and prompt caching—then turns them into a four-step decision path and a reusable cost gateway implementation. Readers will learn why price comparison is the wrong starting point, when caching saves money and when it does not, and which three levers reliably explain a "same usage, half the bill" gap.

    1. The Problem: Same Unit Price, Different Bills

    When teams build an inference cost budget, they often run into a counterintuitive result. Put the price lists of several cloud platforms side by side, and for the same model tier with the same input and output unit prices, the numbers match exactly. Yet at month-end settlement, two functionally equivalent workloads can produce bills that differ by nearly 2x.

    This points to one thing: the pay-as-you-go unit price only sets the slope of the cost curve, not its shape. What actually determines the bill are the rules that never appear in the unit price column—discounts on batch jobs, how monthly plans are credited, pricing differences for idle resources, and the elimination of repeated computation through cache hits. This article abstracts those rules into a general model and lays out a practical cost optimization method.

    2. Cost Model: Breaking the Bill into Computable Terms

    Suppose the call volume within a given time window consists of a number of requests, each with $L{in}$ input tokens and $L{out}$ output tokens. The pay-as-you-go cost can be written as:

    1. Cost_paygo = Σ ( L_in_effective * P_in
    2. + L_out * P_out
    3. + L_cache_write * P_cache_write )

    Here L_in_effective is the actual billed input volume after cache hits are deducted. With a hit rate of $h$, where the hit portion is priced at $P_{cache}$:

    1. L_in_effective = L_in * (1 - h) + L_in * h * (P_cache / P_in)

    This formula explains a common misconception: a high hit rate does not automatically mean savings. Caching is a net gain only when the hit price is significantly lower than the input price (a common industry practice puts the hit price at roughly one-tenth of the input price). Also note that cache writes may be billed separately, and there is a time-to-live (TTL) constraint—a short TTL suits bursty repetition, while a long TTL suits stable system prompts and knowledge prefixes.

    3. Three Rules That Actually Open Up the Gap

    3.1 The Batch Channel

    Offline tasks that can tolerate latency—log summarization, bulk labeling, offline report generation, corpus cleaning—can go through the batch channel and typically receive a discount off the standard price. The magnitude given in the original scenario is 60% of the standard price, which falls within a common industry range. The key constraint is that results are returned with a delay, so this channel cannot carry online interactive paths.

    3.2 Subscriptions and Credit Packages

    The essence of a subscription (the Token Plan type) is prepayment in exchange for a discount: a fixed monthly payment buys a lower marginal unit price, at the cost of wasted spend if you underuse it and a return to pay-as-you-go pricing for anything above the limit. It suits steady, predictable always-on workloads.

    3.3 Off-Peak Scheduling

    Some platforms offer discounted pricing for specific time windows. If the workload allows shifting part of the non-real-time calls into off-peak windows, the bill drops in a step-like fashion. In the original scenario, moving roughly half of the calls to after early evening cut overall cost by nearly half—a structural gain from scheduling, not a change in unit price.

    4. Decision Path: Four Steps to the Cheapest Option

    1. Step 1 Check whether the model tier can be swapped
    2. Swappable -> pick a more economical tier; all four providers
    3. are priced the same, so price comparison is moot
    4. Step 2 Check whether the task is real-time
    5. Non-real-time -> batch channel (discount off standard price)
    6. Step 3 Check whether call volume is stable and predictable
    7. Stable -> subscription + pay-as-you-go overage, usually
    8. better than pure pay-as-you-go
    9. Step 4 Check whether the time distribution can be shifted
    10. Shiftable -> layer on off-peak scheduling

    Following this path, the conclusion from the original scenario abstracts to: when you are not locked into a high-priced model, the platforms are priced the same and price comparison is pointless; offline tasks should use the batch channel first; when locked into a high-priced model with real-time calls, a subscription plus pay-as-you-go overage costs about 10–20% less than pure pay-as-you-go, and if the time distribution can be rearranged, cost can drop by nearly half again; workloads already on a given cloud should connect locally, with fees identical to the first-party provider, so the migration benefit comes from network and operations costs rather than unit price.

    5. Three Details That Are Easy to Miss

    • Automatic cache billing: repeated prefixes usually enable caching automatically, with a default TTL on the order of minutes; writing to the cache may be billed separately, and after a hit only the hit price is charged. In engineering terms, keep the system prompt, tool definitions, and long document prefixes fixed at the very front to guarantee byte-level prefix consistency.
    • Old model versions being retired: vendors stop opening old versions to new users and phase them out over time, and the official guidance is generally to migrate to the newer tier. Architecturally, make the model identifier a configuration item rather than hard-coding it.
    • Free credits and regional differences: new model launches often come with a one-time free credit, and the cache hit price may be missing from the documentation in some regions, so the actual settlement should be treated as authoritative.

    6. A Reusable Cost Gateway Implementation

    Consolidate the rules above into a single gateway so that price-comparison logic is not scattered across business code:

    1. def route(task, tokens, model_locked=False):
    2. if not model_locked:
    3. return {"model": "economy_tier", "channel": "paygo"}
    4. if task.latency_sensitive:
    5. plan = current_plan()
    6. if plan and plan.remaining > tokens:
    7. return {"channel": "subscription", "overage": "paygo"}
    8. return {"channel": "paygo"}
    9. if task.deferrable:
    10. return {"channel": "batch", "discount": 0.6}
    11. return {"channel": "paygo", "window": "off_peak"}

    Three general capabilities are needed alongside it: a logging service to collect the token and cache-hit volume of every call, monitoring and alerting to set thresholds against a monthly budget, and a message queue to absorb peak load for batch tasks and write results back.

    7. Conclusion

    The right way to compare is not to compare unit prices but to compare rules. When unit prices are identical, focus your effort on three things: whether you can switch to a more economical model tier, whether you can move tasks into the batch channel or an off-peak window, and whether a subscription can cover stable baseline traffic. Get these three right, and the difference in bill structure is enough to explain the “same usage, half the bill” phenomenon.