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

    Comparing per-token prices is not the same as comparing cost. This article breaks the LLM API bill into a computable cost model, explains the four billing rules that widen the gap—batch discounts, prompt caching, subscription and off-peak pricing, and free quotas or regional differences—and outlines a three-step decision process for choosing a billing model. It also includes a sample billing-selection function, an optimization checklist, and common pitfalls.

    1. The Problem: Same Unit Price, Double the Bill

    When evaluating LLM API procurement options, a common mistake is treating a “unit price comparison” as a “cost comparison.” In reality, several platforms may quote exactly the same pay-as-you-go rate for the same model—identical prices per million tokens for input, cache hits, and output. Yet running the same call volume under different billing rules can produce monthly bills that differ by nearly 2x.

    The reason is not mysterious. The unit price is only one coefficient in the cost function, while the final bill is the combined result of “unit price × billable volume × discount factors.” What really drives the gap are the rules that do not appear in the main pricing table: batch (offline asynchronous) discounts, how cache writes and hits are billed, subscription coverage and overage settlement, off-peak scheduling discounts, and free quotas or regional differences.

    The core conclusion of this article is therefore: profile your usage first, choose a billing model second, and compare unit prices last. Reverse that order and you end up with conclusions like “all providers are the same” or “this provider is the cheapest”—neither of which holds.

    2. Cost Model: Breaking the Bill into Five Computable Parts

    For the calling behavior within a calendar month, the total cost can be abstracted as:

    1. Cost = Σ_over_models [ Pin*Din + Pcache_hit*Dhit + Pcache_write*Dwrite + Pout*Dout ] * (1 - r_batch) * (1 - r_offpeak)
    2. - FreeQuota
    3. + SubscriptionFee + OverageFee

    Where:

    • Pin/Pcache_hit/Pcache_write/Pout are the unit prices of the four token types;
    • D* is the corresponding billable volume;
    • r_batch is the batch discount rate (offline asynchronous tasks typically qualify for a significant discount);
    • r_offpeak is the off-peak scheduling discount rate;
    • FreeQuota is the one-time free allowance for new users or new models;
    • SubscriptionFee + OverageFee are the fixed fee and pay-as-you-go overage fee under a subscription.

    This equation shows three things. First, identical unit prices only mean the “price vector” inside the brackets is the same. Second, the discount factors are multiplicative and stackable, so the payoff from scheduling strategies is amplified. Third, the subscription model is a hybrid of “fixed cost + marginal cost,” which behaves in exactly the opposite way from the linear structure of pure pay-as-you-go on either side of the break-even point.

    3. Four Rules That Widen the Gap

    3.1 Batch and Asynchronous Discounts

    Offline tasks (data cleaning, batch summarization, offline evaluation, log structuring) are not latency-sensitive, and most platforms offer an asynchronous batch channel billed at a percentage of the standard price. If 70% of a workload’s tokens fall into offline-eligible scenarios, this item alone can deliver a substantial reduction.

    3.2 The Two-Part Structure of Cache Billing

    Prefix caching (Prompt Cache) is usually enabled automatically. A repeated prefix that hits within a short time-to-live is settled at the “hit price,” which is far lower than the input price; however, the cache write itself may be billed separately in tiers by duration. This means the savings are significant when the hit rate is high, while a “short TTL + frequent writes” pattern erodes them. The right criterion is the ratio of hit rate to number of writes, not simply whether the hit price is cheap.

    3.3 Subscription Plans and Off-Peak Rules

    A subscription bundles part of the usage into a fixed fee, with near-zero marginal cost within the covered range and a return to pay-as-you-go beyond it. If the plan applies to specific models and there is an off-peak (low-traffic window) rule, shifting deferrable real-time calls into the off-peak window stacks the discount with subscription coverage.

    3.4 Free Quotas and Regional Differences

    New model launches often come with a one-time free allowance, making short-term trial costs extremely low, but this is not a steady-state cost advantage. Region also affects price: cross-region (for example, overseas regions) unit prices are usually higher than in the primary region, and they add network latency and compliance costs.

    4. Decision Process: Three Steps to Pick a Billing Model

    1. Tag: classify calls into “offline-eligible,” “deferrable real-time,” and “must be instant,” and measure the token share of each.
    2. Calculate break-even: for the portion that must be instant and is locked to a model, compare the intersection of the pure pay-as-you-go curve and the subscription-plus-overage curve.
    3. Connect nearby: for workloads that already have data and permission systems built on a given cloud, prefer same-cloud access to avoid cross-cloud traffic and migration costs canceling out the unit price savings.

    Illustrative decision code:

    1. def pick_billing(tokens, batch_ratio, offpeak_ratio, sub_fee, sub_cover, unit, batch_r, off_r):
    2. on_demand = tokens * unit
    3. billable = tokens * (1 - batch_ratio) * (1 - offpeak_ratio)
    4. overage = max(0, billable - sub_cover) * unit
    5. subscribe = sub_fee + overage
    6. return {"on_demand": on_demand, "subscribe": subscribe,
    7. "best": "subscribe" if subscribe < on_demand else "on_demand"}

    5. Optimization Checklist and Common Pitfalls

    Optimization checklist: place stable prefixes first to raise the cache hit rate; keep system prompts and tool definitions fixed; move retryable tasks into asynchronous batch processing; schedule non-urgent tasks into off-peak windows; use one-time free allowances for load testing rather than production; for long texts, retrieve before generating to compress input tokens.

    Common pitfalls: looking only at the hit price while ignoring write billing; counting a one-time free allowance in a steady-state model; overlooking cross-region price markups; signing a subscription too early while the model is not yet locked in; and counting tokens from retries and log replay as business growth without including them in the budget.

    6. Conclusion

    When pay-as-you-go unit prices converge, the focus of cost engineering shifts from “price comparison” to “billing model and scheduling.” From a general cloud services perspective, general-purpose capabilities offered by platforms such as Baidu AI Cloud—object storage, message queues, container platforms, log services, and monitoring and alerting—can serve as the infrastructure for asynchronous batch processing, cache warm-up, and usage attribution, helping teams turn the model above into an observable, recomputable bill governance process.