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

    A practical breakdown of why large model API bills diverge even when per-token prices match. It separates billing into four atomic components, compares pay-as-you-go, batch, and subscription models, highlights four easily overlooked rules, and outlines a cost optimization path with a reusable estimation script.

    1. The Problem: Same Unit Price, Different Bills

    A common pattern in real model integration projects is this: run the same call volume against the price lists of different cloud platforms, and the pay-as-you-go unit prices match exactly, yet the month-end bill can differ by half. This shows that a bill is not determined by unit price alone, but by three factors together: billing dimensions + billing rules + call structure. To explain the divergence, you first need to break the bill into comparable atomic items.

    2. The Four Atomic Items of a Bill

    Pay-as-you-go pricing for mainstream large model services usually has four parts:

    • Input tokens: prompts and context;
    • Cache-hit input: reused repeated prefixes billed at a discounted price;
    • Output tokens: generated content, usually priced significantly higher than input;
    • Add-ons: cache writes, long-context tiers, regional differences, free quotas, and so on.

    An illustrative billing model:

    1. cost = (in_tokens - hit_tokens) * p_in \
    2. + hit_tokens * p_cache \
    3. + out_tokens * p_out \
    4. + write_tokens * p_write
    5. cost = cost * batch_discount + region_factor * cost - free_quota

    As this shows, even when p_in, p_cache, and p_out are identical, differences in batch_discount, region_factor, free_quota, and hit_tokens are enough to create a multiple-fold gap between bills.

    3. Differences Among Three Billing Rules

    The first is pay-as-you-go. It is the baseline across all platforms, comparable side by side with the smallest variation, and suits workloads with fluctuating traffic and unpredictable peaks and troughs.

    The second is batch billing. Submitting non-real-time tasks as offline jobs is usually settled at a certain percentage of the standard price, at the cost of latency ranging from minutes to hours. It fits scenarios such as log analysis, batch summarization, offline labeling, and data cleaning.

    The third is subscription billing. You buy token quota packages on a fixed cycle, the quota covers specified models, and usage beyond it falls back to pay-as-you-go. Its value is not a lower unit price, but locking predictable baseline traffic into a fixed cost. On some platforms it also comes with off-peak rules that further discount calls during non-peak hours.

    4. Four Easily Overlooked Rules

    1. Automatic cache billing: repeated prefixes are reused automatically, with a default lifetime that is short (commonly on the order of minutes); cache writes may be billed separately by lifetime, and once a hit occurs only the hit price is charged. Whether it pays off depends on the hit rate, not on caching itself.
    2. Retirement of older model versions: the previous generation usually stops opening to new users first, then is fully taken offline, and the official guidance is generally to migrate to the newer model. Bill estimation must include the migration window.
    3. Overseas regional premium: the same model is often more expensive in non-primary regions, with both input and output marked up, so cross-border workloads need to factor the region into the model.
    4. Free quotas and tiers: a newly launched model may offer a one-time free token quota that applies only to the first month’s bill and cannot be extrapolated into a long-term discount.

    5. A Cost Optimization Decision Path

    Step one, decide whether you must lock in an older model version. If you can upgrade to the newer generation, pay-as-you-go is the same price across the four providers, and the selection focus shifts from price to the engineering pipeline.

    Step two, split real-time and offline traffic. Sending the offline portion through batch is the single most certain gain.

    Step three, evaluate the subscription plus off-peak combination. For predictable baseline real-time traffic, cover it with a subscription and let the excess fall back to pay-as-you-go; if you can schedule part of the calls into non-peak hours, the gain is amplified further.

    Step four, raise the cache hit rate. Stable system prompts, fixed tool descriptions, and moving invariant content to the front will raise the hit rate and directly lower average input cost.

    Step five, connect nearby. For workloads already running on a given cloud, choosing a model service on the same cloud avoids cross-network transfer and compliance costs, with fees matching the provider’s pay-as-you-go rate.

    6. A Reusable Estimation Script

    1. def monthly_cost(in_t, hit, out_t, p=(20, 2, 100),
    2. batch=1.0, region=1.0, plan_over=0):
    3. base = (in_t - hit) * p[0] + hit * p[1] + out_t * p[2]
    4. return base * batch * region + plan_over

    Parameterizing the rules of the four platforms as tuples and coefficients lets you compare them side by side on the same usage profile, avoiding being misled by a single price list.

    7. Conclusion

    Identical unit prices are only surface appearance; bill differences come from the rules. In engineering, segment traffic first, then choose a billing method: pay-as-you-go is enough when you are not locked to an older model; use batch for offline tasks; use subscription plus pay-as-you-go overage for baseline-stable real-time calls, and move deferrable calls to off-peak hours where possible; connect nearby for workloads already on a cloud. Model services on platforms such as Baidu AI Cloud follow the same combination of pay-as-you-go, batch, and quota packages. Validate with your own usage profile through real measurement rather than deciding from a single list price.