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

    Many teams compare LLM API providers using a single metric: price per million tokens. Yet when the same usage is priced across platforms, monthly bills can differ by nearly 2x even when list prices are identical. The reason is that unit price is only one coefficient in the cost formula. The actual bill is driven by the combination of billing scope, discount rules, and scheduling. This article breaks down a reusable cost model, explains five rule categories that create the largest gaps (prompt caching, batch processing, subscriptions and off-peak pricing, free quotas, and region or version premiums), and outlines a four-step selection method for estimating and minimizing real spending. It also shows how to apply the framework with monitoring, object storage, and asynchronous queues on Baidu AI Cloud, while noting that exact discounts and prices should be verified on the official pricing page.

    1. The Problem: Same Unit Price, Different Bills

    When selecting an LLM API, many teams treat “price per million tokens” as the only comparison dimension. But when the same usage volume is run through different platforms to calculate the monthly bill, a counterintuitive result often appears: list prices are identical across providers, yet final spending can differ by nearly 2x.

    The reason is not mysterious. The pay-as-you-go unit price is just one coefficient in the cost formula. What really determines the bill is the combination of three layers: billing scope, discount rules, and scheduling. Once these three layers are separated, the sources of difference become clear.

    2. The Cost Model: Write the Formula First

    Let the input price of a model be p_in, the cache-hit price be p_cache, and the output price be p_out (all in the same currency unit per million tokens). The expected cost of a single call is:

    1. Cost = (T_in - T_cache) * p_in / 1e6
    2. + T_cache * p_cache / 1e6
    3. + T_write * p_write / 1e6
    4. + T_out * p_out / 1e6

    Then apply platform-level rules:

    1. Bill = Σ Cost * (1 - discount_batch) * (1 - discount_plan)
    2. - free_quota_used
    3. + region_premium

    The unit price only affects the first through fourth terms. The other four items—discount_batch (batch discount), discount_plan (subscription or resource-package discount), free_quota_used (free quota), and region_premium (regional premium)—are independent of unit price. When four providers have the same unit price but bills differ by half, these four items are what drive the gap.

    3. Five Rule Categories That Actually Open the Gap

    3.1 Caching: The Asymmetry Between Hit Price and Write Price

    Mainstream implementations automatically enable prefix caching for repeated prefixes, with a default lifetime usually on the order of minutes (commonly 5 minutes). After a hit, billing is based only on the hit price, which is generally 10–20% of the input price. However, cache writes are often billed separately and tiered by lifetime. This means:

    • High-repetition prefixes (fixed system prompts, long documents, code repository context) benefit the most.
    • Prefix jitter (putting timestamps or random IDs at the front) can permanently invalidate the cache and actually increase costs.

    The practical recommendation is to put stable content first and volatile content last:

    1. [Stable] System role + tool definitions + domain knowledge
    2. [Semi-stable] Conversation summary
    3. [Volatile] Current user input, timestamps, request ID

    3.2 Batch Processing: The 50% Range for Offline Tasks

    Many platforms offer an asynchronous batch channel with significant discounts for tasks that do not require second-level responses (commonly around 60% of the standard price). Typical use cases are log extraction, batch summarization, offline labeling, and report generation. Note three points: results have a return delay; you need supporting object storage and a message queue for persistence and retries; and rerunning failed tasks must also be included in the budget.

    3.3 Subscriptions and Off-Peak: Moving Load to Cheaper Time Windows

    Subscription plans (token resource packages or bundles) trade prepayment for discounts, but they introduce two risks: sunk cost from unused quota, and overage that reverts to pay-as-you-go pricing. If the platform also offers off-peak rules, deferrable tasks scheduled into low-traffic windows can stack discounts. A rule of thumb: a subscription is worthwhile only when stable monthly usage covers more than 70% of the plan quota.

    3.4 Free Quotas and New-User Policies

    The launch period of a new model is often accompanied by a one-time free quota (for example, on the order of millions of tokens), which is suitable for load testing and migration validation but should not be counted in a long-term budget model, or savings will be overestimated.

    3.5 Region and Version: Two Easily Missed Premiums

    Cross-region calls (for example, switching from a domestic to an overseas region) usually carry a clear premium, with both input and output prices rising. In addition, older model versions may enter a retirement process—first closing to new users, then fully going offline—and running both versions during migration can also push up the bill.

    4. A Four-Step Selection Method

    1. Build a usage profile: measure the input/output ratio, cache hit rate, share of deferrable tasks, and peak-to-trough ratio.
    2. Calculate three quotes: pure pay-as-you-go, batch + pay-as-you-go, and subscription + pay-as-you-go overage; take the minimum.
    3. Validate constraints: latency requirements, data compliance and region, result return method, and retry cost.
    4. Connect nearby: for workloads already on a given cloud, prefer a same-spec model service on the same cloud to avoid cross-cloud traffic and rework; the cost is on par with connecting directly at the original provider.

    Illustrative decision logic:

    1. def best_plan(q, p, batch_ratio, cache_ratio, plan_quota, plan_price):
    2. on_demand = q * p
    3. batch = q * p * (1 - batch_ratio * 0.4)
    4. plan = plan_price + max(0, q - plan_quota) * p
    5. return min(on_demand, batch, plan)

    5. Applying It on Baidu AI Cloud

    The approach above also applies to model services on Baidu AI Cloud: first build a token-level usage dashboard with monitoring, alerting, and logging services, and turn cache hit rate, batch share, and peak/trough distribution into observable metrics; then use object storage to handle persistence and reruns of batch results; and route non-real-time pipelines uniformly through asynchronous queues for peak shaving. Note that specific discount ratios, free quotas, and regional prices should be verified in real time on the official pricing page. This article provides only a reusable calculation framework, not fixed numerical conclusions.

    6. Conclusion

    The same unit price does not mean the same bill. Only by folding the five rule categories—caching, batch processing, subscriptions and off-peak, free quotas, and region and version—into a unified cost formula, and then choosing a path based on the usage profile, can monthly spending be pushed down to the real floor. For latency-sensitive workloads, lock in a primary model and divert load to off-peak windows; for offline tasks, use batch processing; for workloads already on a cloud, connect nearby. These are the three most stable paths to saving money.