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

    Many teams compare large language model services using a single metric: price per million tokens. Yet when the same workload is priced across different platforms, the monthly bill can vary by nearly 2x even when the per-token rates are identical. This article explains why that happens, breaks down the full billing model behind the final invoice, and offers a reusable framework for estimating, comparing, and optimizing LLM API costs across batch processing, subscriptions, caching, free tiers, and region choices.

    1. The Problem: Same Unit Price, Different Bills

    When selecting an LLM service, many teams treat “price per million tokens” as the only comparison metric. But when the same call volume is priced across different platforms, a counterintuitive result often appears: the pay-as-you-go unit prices are identical, yet the monthly bills can differ by nearly 2x.

    The reason is not mysterious. The unit price is only one coefficient in the billing formula. What actually determines the bill is the complete billing model:

    1. Monthly bill = Σ(token volume per category × unit price × discount factor) + subscription/resource pack fixed fee - free tier

    The “discount factor” is determined by rules such as batch processing, off-peak scheduling, and cache hits, while the “free tier” is determined by the platform’s new-model trial policy. When every platform sets the factor to 1, the bills are naturally the same. Once one platform allows the factor to drop to 0.6, or allows a fixed fee to replace most pay-as-you-go spending, the gap appears.

    The right comparison, therefore, is not unit price against unit price, but one set of billing rules against another. This article follows that approach and presents a reusable method for cost accounting and optimization.

    2. Cost Model: Write the Bill as a Computable Formula

    Let the input token volume be $I$, the cache-hit portion be $I_h$, the cache-miss portion be $I_m$, and the output token volume be $O$. The theoretical cost of a single call can be written as:

    1. Cost = (I_h × P_cache_hit + I_m × P_input + O × P_output) / 1,000,000

    In engineering practice, it is better to instrument the gateway layer to track these three quantities separately rather than only tracking “total tokens.” The reason is straightforward: the cache-hit price is usually around one-tenth of the input price. If hit tokens are mixed into the input token count, the effect of optimization becomes completely invisible.

    A simplified monthly estimation script:

    1. def estimate_month(reqs, price, batch_ratio=0.0, cache_hit_ratio=0.0):
    2. # price: (input, cache_hit, output) in currency units per million tokens
    3. total = 0.0
    4. for r in reqs:
    5. hit = r.input * cache_hit_ratio
    6. miss = r.input - hit
    7. cost = (hit * price[1] + miss * price[0] + r.output * price[2]) / 1e6
    8. total += cost * (0.6 if r.is_batch else 1.0) * (1 - batch_ratio * 0)
    9. return total

    The key takeaway is that the bill is extremely sensitive to the “output token ratio” and the “cache hit rate.” The output unit price is often several times the input unit price. For a workload whose output ratio rises from 20% to 40%, the bill nearly doubles, regardless of which platform is chosen.

    3. Four Billing Rules That Create the Gap

    1. Batch (Asynchronous Offline) Discounts

    Batch processing places requests in an offline queue, trading acceptable latency for a significant discount, commonly a set percentage of the standard price (such as 60%). It suits scenarios like log summarization, bulk document extraction, offline annotation, data cleaning, and end-of-day reports. There is only one criterion: whether the result must be returned within seconds. If minute-level or even hour-level latency is acceptable, the batch channel should be the default.

    2. Subscriptions and Resource Packs

    The subscription model exchanges a fixed periodic fee for a token quota that covers specified models, with usage beyond the quota settled pay-as-you-go. Its value lies in converting unpredictable pay-as-you-go spending into a budgetable fixed cost. It is most cost-effective when steady-state usage falls near the quota; if usage fluctuates greatly or stays far below the quota over the long term, a subscription can actually raise costs. Some platforms also offer extra discounts for off-peak calls, so scheduling non-real-time tasks to run at night can reduce costs further.

    3. Caching and Free Tiers

    Prefix caching is usually enabled automatically. A repeated prefix that hits within a short time-to-live is billed at the hit price; if a longer lifetime is needed, cache writes are billed separately. The engineering implication is that placing stable content such as system prompts, tool definitions, and long documents at the front and keeping it byte-for-byte identical can reliably secure the discount. Free tiers, by contrast, are one-time and only affect the first month’s bill; they should not be a basis for long-term selection.

    4. Region and Model Lifecycle

    The unit price of the same model may be higher in some regions, and cross-border calls add network latency and compliance costs. In addition, older model versions often go through a process of “closing to new users, then full retirement,” which brings migration risk beyond the bill itself.

    4. An Actionable Optimization Checklist

    • Start with bill attribution: break down token volume by model, business line, and call type, and identify the three APIs with the highest output ratio.
    • Channel routing: send real-time traffic through pay-as-you-go, offline traffic through batch, and latency-tolerant nighttime tasks through off-peak discounts.
    • Prompt governance: place stable prefixes at the front, remove volatile content such as timestamps, and track the cache hit rate as a monitoring metric.
    • Tiered model selection: route simple tasks to lightweight models and reserve flagship models for complex reasoning.
    • Usage quotas: use subscriptions to lock in a baseline for steady-state workloads, and keep pay-as-you-go as a fallback for bursts.
    • Nearby access: for workloads already running on a given cloud, prefer model services on the same platform to avoid cross-network and data-transfer costs.
    • An abstraction layer: isolate model calls in code to avoid being locked into a single billing rule.
    1. Real-time requests ──► pay-as-you-go channel
    2. Offline tasks ──► batch channel (~60% of standard price)
    3. Stable prefixes ──► cache hit (~10% of input price)
    4. Steady baseline ──► subscription quota + pay-as-you-go overage

    5. Conclusion

    Identical unit prices but different bills come down to different billing rules. When choosing a model, there is no need to lock onto a single version; prioritize the general-purpose tier with better cost-performance. Use batch processing for offline tasks; use a subscription plus pay-as-you-go overage for real-time, version-locked workloads; and use nearby access for workloads already running in the cloud. To further combine cost governance with elastic compute, you can look at relevant general capabilities from Baidu AI Cloud, such as combining container platforms, object storage, and monitoring and alerting services, to bring token costs into a unified observability system and shift from “reviewing the bill at month-end” to “watching unit cost in real time.”