Why LLM API Bills Can Double at the Same Token Price

    Many teams compare LLM API costs by looking only at the per-thousand-token price. In practice, identical usage can produce monthly bills that differ by nearly 2x across access channels, even when the published pay-as-you-go rates are the same. This article breaks the bill into four layers, shows how batch discounts and subscription credits affect different parts of the cost formula, and explains which variables shape the final bill. It also includes a selection checklist, routing implementation notes, and common mistakes to avoid.

    1. The Problem: Same Unit Price, Different Bills

    When estimating LLM API costs, many teams focus on a single number: the price per thousand tokens. Yet real bills often show a counterintuitive result. For the same call volume, the monthly cost can differ by nearly 2x across access channels, even though the published pay-as-you-go unit prices are identical.

    This means the unit price is only one dimension of the bill, not the whole picture. Breaking a bill down usually reveals four layers:

    • Base pay-as-you-go cost: input tokens and output tokens are priced separately, with output typically more expensive;
    • Batch discount: asynchronous, latency-tolerant workloads generally receive a discount factor across the industry;
    • Subscription credit: a prepaid amount buys a certain credit allowance, and usage above that allowance returns to pay-as-you-go;
    • Additional charges: cache hits, long-context tiers, and duplicate billing from failed retries.

    Once the first layer is equalized, the outcome is decided by the second and third layers. This is the root cause of “same price, different bill.”

    2. Bill Model: Writing the Rules as Formulas

    Let the input tokens in a given period be $T{in}$ and the output tokens be $T{out}$, with pay-as-you-go unit prices $p{in}$ and $p{out}$. The base cost is:

    1. Cost_base = T_in * p_in + T_out * p_out

    Introduce the batch ratio $\alpha$ (the share of calls sent to asynchronous batch processing) and the batch discount factor $\beta$ (commonly around 50% in the industry; refer to the channel’s published terms for specifics):

    1. Cost_batch = Cost_base * (1 - alpha * (1 - beta))

    Introduce a subscription: let the subscription allowance be $Q$, the subscription price be $S$, and the overage pay-as-you-go factor be 1:

    1. Cost_sub = S + max(0, Cost_realtime - Q) * 1
    2. Cost_realtime = Cost_base * (1 - alpha)

    The final bill takes the smaller of the two strategies, combined with the choice of the nearest access channel:

    1. Cost_total = min(Cost_batch, Cost_sub) + Cost_others

    This model explains a key phenomenon: batch processing affects the “unit price,” while a subscription affects “how much of the total volume can be covered by prepayment.” They act on different points, so they cannot replace each other.

    3. Four Variables That Shape the Bill

    1) Available batch ratio. Tasks such as offline evaluation, batch summarization, log structuring, and offline labeling are naturally deferrable and have high batch coverage; real-time conversations and online agent decisions can hardly be batched.

    2) Distribution of call times. If non-real-time tasks can be scheduled into off-peak periods, the peak-valley price difference combined with the batch discount produces a multiplicative gain rather than an additive one.

    3) Usage stability. The value of a subscription depends on whether actual usage stays close to the allowance: usage far below the allowance is wasted, while usage far above it means the subscription covers only a small portion.

    4) Version lock-in. Binding to a specific model version introduces supply and pricing uncertainty. Preferring a continuously updated general-purpose version brings the negotiation space back to the level of rules.

    4. Selection Checklist

    • No specific version locked, mainly online calls: pay-as-you-go prices are the same across channels, so focus on network latency and stability rather than unit price;
    • A large volume of offline tasks: choose the channel with the clearest batch discount and migrate deferrable tasks to an asynchronous queue as a whole;
    • Version locked and mainly real-time calls: use a subscription to cover baseline traffic and pay-as-you-go for overage, which is usually cheaper than fully pay-as-you-go;
    • An existing data center or data plane on a particular cloud: connect to the same cloud locally to avoid cross-network transfer and compliance costs, keeping costs consistent with the original provider’s terms.

    5. Implementation Notes

    Use a unified gateway to hide channel differences and make the routing policy configurable:

    1. def route(task):
    2. if task.deadline_slack > 3600: # deferrable
    3. return "batch_queue"
    4. if task.qps_stable and task.baseline_covered:
    5. return "subscription_channel"
    6. return "on_demand_channel"

    Three supporting steps: first, tagging—record the task type, time period, and token consumption for each call to build a usage profile; second, replay—recalculate bills for different strategies on the formula using historical usage before deciding on a contract; third, alerting—set thresholds for allowance utilization, overage ratio, and batch retry failure rate so that discounts are not eaten up by retries.

    6. Common Mistakes

    • Looking only at unit price while ignoring discount rules, leading to budget deviations;
    • Putting deferrable tasks into the real-time path and giving up batch benefits;
    • Purchasing subscription allowance based on peak usage, resulting in low long-term utilization;
    • Ignoring duplicate billing from retries and extra-long contexts;
    • Over-binding to a single model version and losing the initiative to negotiate based on rules.

    7. Conclusion

    Unit prices converging is the industry norm; cost differences come from how the rules are used. First classify tasks, then replay with the formula, and finally adjust with the two levers of subscription and batch processing. Most teams can significantly reduce monthly spending without changing business outcomes. For teams already using Baidu AI Cloud capabilities, nearest-access connection and a unified gateway can make the cost basis clearer and more predictable.