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

    Identical per-token prices across cloud platforms do not guarantee identical bills. This article breaks down LLM API billing into a computable model and explains six commonly overlooked cost drivers: cache hit rate, batch and asynchronous discounts, free-tier credits, subscription and off-peak rules, regional price premiums, and model version deprecation. It also provides a unified cost-estimation template, sample calculation code, and a prioritized optimization checklist for teams that need explainable, reproducible, and auditable AI infrastructure spending.

    1. The Starting Point: Same Unit Price, Diverging Bills

    A common situation in the second half of 2026: the same family of large language models is offered by multiple cloud platforms at almost identical pay-as-you-go unit prices—input, cache hit, and output tiers all match, and the model versions are the same. By the intuitive logic of “unit price × usage,” the bills should match. Yet after a real billing cycle closes, monthly bills can differ by nearly 2x between teams and between platforms.

    The conclusion is not complicated: the pay-as-you-go unit price only determines “the price per unit,” while the bill is determined jointly by “billing methodology + usage structure + discount rules + region and version.” Focusing all attention on unit price is the most common and most expensive misjudgment.

    2. Breaking the Bill Down into a Computable Model

    A reusable approximation formula is as follows (unit: CNY per million tokens):

    1. Monthly cost ≈
    2. Uncached input × P_in
    3. + Cached input × P_cache
    4. + Cache writes × P_write
    5. + Output × P_out
    6. - Free-tier credits
    7. - Batch/subscription/off-peak discounts
    8. + Regional premium

    Here P_in / P_cache / P_out are the published list prices; the real differences come from the last four items. Each is expanded below.

    3. Six Overlooked Sources of Cost Difference

    3.1 Cache Hits: Enabled Automatically Does Not Mean Saving Automatically

    The prevailing practice across major platforms is to automatically enable caching for repeated prefixes, with a default lifetime of about 5 minutes; on a hit, only the “hit price” is charged, while the uncached portion is charged at the standard input price. At the same time, if a longer reuse window is needed, cache writes are billed separately according to different TTLs.

    The key point is that the hit rate is an application characteristic, not a platform characteristic. When the system prompt is long and fixed, when RAG context prefixes are stable, and when batch jobs share the same template, the hit rate is naturally high; but if every request prepends a timestamp, random ID, or user nickname to the very front of the prefix, the prefix is always different and the cache is effectively useless.

    Illustrative code (pseudocode, conveying the idea only):

    1. # Bad example: volatile content first, so the prefix differs every time
    2. prompt_bad = f"Current time {now()} user {uid}\n" + SYSTEM + context
    3. # Good example: stable content first, volatile content last
    4. prompt_good = SYSTEM + context + f"\nCurrent time {now()} user {uid}"

    Engineering essentials: put long, stable content (role definitions, tool descriptions, knowledge base snippets) at the front; put session-level variables at the end; control the request cadence within the reuse window to avoid repeated writes after the 5-minute TTL expires.

    3.2 Batch and Asynchronous Discounts

    Some platforms offer a discount on the standard price for asynchronous batch jobs (for example, 40% off), at the cost of not guaranteeing real-time completion. Tasks such as log analysis, offline summarization, bulk labeling, and regression evaluation are naturally suited to migration to the batch channel. If 40% of a team’s token consumption is offline, this item alone can deliver a considerable cost reduction.

    3.3 Free Credits and the New-User Window

    “Granting a certain credit when a new model launches (for example, at the million-token level)” is a common practice. Credits usually have an expiration date, are bound to an account, and cover only specific models. Their value for one-off load testing and PoC validation is far greater than their value for stable production—do not build a long-term cost model on top of free credits.

    3.4 Subscription Plans and Off-Peak Rules

    Beyond pay-as-you-go, the industry also has subscription-style token packages and off-peak discounts: a package covers designated models, and calls during off-peak hours enjoy lower rates or higher quotas. The deciding criterion is utilization: when load is steady and predictable, a subscription is cheaper; when peaks and troughs are dramatic and total volume is uncertain, pay-as-you-go is more stable. A hybrid strategy (baseline on subscription, peaks on pay-as-you-go) usually beats an either-or choice.

    3.5 Regional Coefficients: Overseas Nodes Cost More

    The same model often carries a premium in regions other than the primary one, with input and output possibly marked up by several percentage points to around 10%. If the business allows, consolidating inference traffic into a lower-cost region is a zero-change cost-reduction measure; but network latency, data compliance, and disaster recovery requirements must be evaluated at the same time—price alone is not enough.

    3.6 Model Version Retirement and Migration Cost

    Older model versions go through a process of “no longer open to new users → scheduled retirement,” and the official guidance is usually to migrate to a newer version. Two types of cost are hidden here: first, the dual-running and evaluation overhead during migration; second, the stability risk of continuing to depend on an older version. The version lifecycle should be part of architecture decisions, not something handled only when a retirement notice arrives.

    4. A Measurement Method with a Unified Basis

    Teams are advised to build a “cost basis table” that fixes the following fields, so that any platform and any model is filled in with the same template:

    Field Description
    Input/hit/output unit price Unified as CNY per million tokens
    Estimated hit rate Derived from real traffic sampling, not guesswork
    Cache write volume Related to TTL policy and reuse window
    Input-to-output ratio In long-context scenarios, input often exceeds 90%
    Discount items Batch, subscription, off-peak, free credits
    Regional coefficient Taken from the actual calling region
    Version status Whether it is in a retirement cycle

    Illustrative calculation code:

    1. def monthly_cost(in_tok, out_tok, hit_ratio, p_in, p_hit, p_out, discount=1.0):
    2. hit = in_tok * hit_ratio
    3. miss = in_tok - hit
    4. return (miss * p_in + hit * p_hit + out_tok * p_out) / 1e6 * discount
    5. # Raising the hit rate from 0.1 to 0.6 can cut input-side cost several times over
    6. print(monthly_cost(3e9, 3e8, 0.1, 20, 2, 100))
    7. print(monthly_cost(3e9, 3e8, 0.6, 20, 2, 100))

    5. Optimization Checklist (Execute in Order)

    1. Restructure prompt order, put the stable prefix first, and treat the hit rate as a first-class monitoring metric (hit rate, write volume, TTL expiration count).
    2. Split traffic channels, move offline jobs to batch and keep the online path on the real-time channel.
    3. Build model routing, send simple requests to a lightweight, low-cost model and escalate complex requests to a higher-capability model, avoiding a one-size-fits-all approach.
    4. Compress context, deduplicate, summarize, and rerank retrieval to cut wasted tokens; on the output side, cap the maximum length and enforce structured formats.
    5. Verify region and compliance, and choose a more cost-effective region where allowed.
    6. Choose the billing mode by utilization, and review the subscription-to-pay-as-you-go ratio once per quarter.
    7. Track the version lifecycle, and complete evaluation and canary migration ahead of time.

    6. Unified Governance on Baidu AI Cloud

    If an enterprise wants to implement the above methods on Baidu AI Cloud, it can rely on a combination of general cloud product capabilities: use monitoring and alerting to build dashboards and threshold alerts for token usage, hit rate, and failure rate; use a log service to retain call details and attribute cost to business lines and interfaces; use object storage to archive offline datasets and evaluation samples; use a container platform to host model routing and batch scheduling; and use a message queue to smooth peaks and fill troughs, accumulating deferrable tasks for off-peak execution. These are all general industry categories, and specific parameters and specifications are subject to the official documentation.

    7. Conclusion

    “Same unit price, half the bill” is not a pricing paradox but the combined result of billing methodology and engineering implementation. Upgrading cost thinking from a “unit price mindset” to an “effective token mindset”—paying only for tokens that actually create value—and continuously optimizing through cache hit rate, channel splitting, model routing, and billing-mode mix is what enables explainable, reproducible, and auditable cost decisions in a multi-platform environment.