LLM API Cost Comparison: Why Identical Token Prices Can Produce Very Different Bills

    Identical per-token prices do not guarantee identical LLM API costs. This article explains how batch discounts, subscriptions, off-peak pricing, cache billing, and regional rates affect monthly spending, then provides a practical framework for choosing providers and tracking costs.

    1. Why Matching List Prices Do Not Mean Matching Bills

    When comparing large language model APIs, many teams start with per-token pricing. For the same model, major cloud distribution channels often list nearly identical rates for input tokens, cached input tokens, and output tokens. This can reflect standardized pricing from the model developer and thin margins for distributors.

    Yet teams with the same usage volume can see monthly bills differ by 30%–50%. Per-token rates are only the visible layer of pricing. The billing rules behind those rates can make the real difference.

    This article breaks down those rules and presents a reusable framework for optimizing API costs.

    2. How to Read a Token Pricing Table

    Consider a hypothetical flagship model available through four providers. Each lists the following prices per million tokens:

    • Input: CNY 20
    • Cached input: CNY 2
    • Output: CNY 100

    Based on standard usage rates alone, the providers appear equivalent. Before choosing one, however, check three details.

    1. Is cached-input pricing clearly listed? Some pricing pages omit this category. Confirm whether the provider supports prefix caching and what rate applies; otherwise, actual spending may differ from your estimate.
    2. Does pricing vary by region? The same provider may charge different rates across regions. Certain overseas or cross-border regions may carry a 5%–10% premium. Compare the endpoints relevant to your deployment rather than assuming a single global price.
    3. What is the model version’s lifecycle? Older versions are gradually retired, usually with an official migration recommendation. Depending on an older version creates a future migration obligation, so include that risk in your cost assessment.

    3. Four Billing Rules That Drive Cost Differences

    3.1 Batch Processing Discounts

    Many major providers offer asynchronous batch APIs for workloads that can wait up to 24 hours for results. Batch pricing can be substantially lower than standard pricing, with the rates described here around 50%–60% of the standard rate.

    Suitable workloads include:

    • Data cleaning and bulk annotation
    • Offline document summarization and evaluation runs
    • Scheduled report generation

    The basic screening question is: Does the task require a response within seconds? If not, consider Batch, provided its completion window meets the workload’s deadline.

    A typical mixed architecture uses synchronous APIs for real-time requests and Batch for offline work. This split alone can remove a substantial portion of the overall bill.

    3.2 Subscriptions and Off-Peak Discounts

    Some providers offer prepaid subscriptions: a fixed payment buys a token allowance, while usage beyond that allowance returns to pay-as-you-go billing. These plans may also include off-peak pricing, allowing deferrable requests to run during lower-demand periods at a reduced rate.

    Whether a subscription pays off depends on usage stability:

    • Stable, predictable usage: A subscription with pay-as-you-go overages can cost 10%–25% less than pay-as-you-go alone.
    • Roughly half of requests can run off-peak: Combined savings may reach 40%–50%.
    • Highly variable usage: Unused allowances can make a subscription more expensive than pay-as-you-go.

    3.3 Hidden Costs in Cache Billing

    Prefix caching is a key way to reduce the cost of repeated context. However, cache writes may be billed separately, and the default time to live (TTL) can be short—for example, five minutes.

    Two implications matter:

    • Frequently reused prefixes, such as long system prompts or fixed document context, should be structured to achieve cache hits. Cache-hit pricing may be only 10% of the normal input rate.
    • If requests arrive less frequently than the TTL allows, the cache may repeatedly expire and require new writes, increasing costs. Warm-up requests may help keep the cache active, or a provider may offer a billing tier with a longer TTL.

    The relevant comparison is the total cost of cache writes and hits, not just the advertised cache-hit rate.

    3.4 New-Model Credits and Migration Incentives

    When new models launch, providers may offer free allowances on the order of millions of tokens. For projects in validation, these credits can reduce the cost of experimentation to zero within the allowance.

    However, free credits alone should not drive a model switch. If evaluation shows that the model does not meet your requirements, free tokens do not make it a suitable choice.

    4. A Provider Selection Framework

    Workload or situation Recommended strategy Potential savings or benefit
    Offline batch tasks Prioritize providers with Batch discounts 40%–50%
    Stable real-time usage Use a subscription with pay-as-you-go overages 10%–25%
    Requests that can run off-peak Combine a subscription with off-peak pricing May exceed 45%
    Existing workloads on a cloud platform Use that platform’s model service where appropriate Avoid cross-cloud data-transfer costs and simplify billing reconciliation
    Frequently repeated prefixes Verify cache billing and optimize prefix structure Around 90% on cache-hit input tokens

    These estimates depend on the applicable provider rules and how much of the workload qualifies. They are not guaranteed reductions in the total bill.

    5. Engineering Recommendations

    1. Attribute Costs at the Request Level

    At the gateway layer, record the model, token counts, cache-hit status, and whether each request used Batch. Review costs monthly to identify spending shifts caused by changes in billing rules.

    2. Abstract Provider Routing

    Use a unified access layer compatible with common chat API protocols to isolate provider differences. This allows provider changes through configuration rather than application-code changes.

    An illustrative configuration:

    1. routes:
    2. - model: flagship-model
    3. realtime: channel-a
    4. offline: channel-a-batch # Batch discount
    5. idle_window: "18:00-06:00" # Off-peak scheduling
    6. cache:
    7. prefix_ttl: 300

    3. Review Pricing Pages Regularly

    Batch discounts, subscription terms, and regional pricing can change. Review them quarterly and record the date of each verification.

    4. Check Retirement Schedules Before Committing

    Before subscribing to an older model version, confirm its official retirement timeline and migration path. This helps avoid a commitment that later forces a more expensive migration.

    6. Conclusion

    Optimizing LLM API costs is largely an exercise in understanding billing rules. Even when list prices match, Batch discounts, subscriptions, off-peak pricing, cache billing, free allowances, and regional rates can produce very different monthly bills.

    Classify requests as real-time, deferrable, or offline, then match each category to the most suitable provider terms. Under favorable conditions, this can cut monthly spending by roughly half without changing model-side code.

    For developers, the more durable advantage is not simply finding the “cheapest provider.” It is building a repeatable system for usage attribution, provider routing, and workload scheduling.