LLM API Pricing: Why Bills Differ at the Same Price per Million Tokens
Two providers can list the same price per million tokens and still produce very different monthly bills. This article explains how caching rules, batch discounts, subscription overage, off-peak pricing, and regional rates affect total cost. It also outlines a method for estimating spend from your own usage data. All figures are illustrative assumptions.
1. Same Unit Price, Different Bills
When choosing a model provider, many teams compare only the list price per million tokens. A matching list price does not mean a matching bill. Several billing rules together determine the final cost: how caching is charged, discounts for offline batch processing, the transition between subscriptions and overage, off-peak pricing, and regional rates. If any of these is not accounted for, budgets and actual spending will diverge.
This article does not cite specific platform prices or promise a fixed savings percentage. All numbers in the article are hypothetical values that demonstrate the calculation method. Before making a decision, check the latest pricing documentation from each provider.
2. Caching: Depends on Repeated Prefixes and Time Windows
Many platforms offer context caching for repeated request prefixes. A prefix can be a system prompt, tool definitions, or a long document. When a cache hit occurs, the read price is usually lower than the standard input price. Caching also has costs. Writing to the cache may be billed separately, and cache entries expire after a time-to-live (TTL). Default settings, TTL options, and write prices differ across platforms, so do not assume that all platforms behave the same way.
To judge whether caching pays off, track three metrics:
- Cache hit rate: the share of input tokens that come from a cached prefix.
- Write frequency: how often the prefix is rewritten. The more often it is written, the higher the write costs.
- Interval between requests: whether the time between two calls is shorter than the TTL. If the gap is too long, the cache expires, and the prefix must be written again.
In engineering terms, place fixed content at the start of the prompt and variable content at the end. This increases prefix reuse.
3. Batch Offline Jobs: Check Each Discount Condition
The Batch API suits tasks that do not need an immediate response, such as data analysis, bulk content review, and log parsing. Some platforms offer discounts for batch jobs, but the eligible models, regions, billing cycles, and completion deadlines vary widely. Some discounts apply only to specific models. Others require jobs to finish within a set window.
A batch discount on one platform does not mean other platforms lack one. Nor should a discount advertised by a platform lead you to ignore queue wait time. Before purchasing, confirm the following with the provider:
- Which models the discount applies to;
- Whether the discount varies by region;
- The completion deadline and the rules for missed deadlines;
- Whether the discount can be combined with other offers.
4. Subscriptions and Overage: Estimate Steady Load First
Subscription plans typically include a base quota, and usage beyond it is billed pay-as-you-go. Some platforms also offer off-peak rates during certain hours, such as the evening. Subscriptions suit predictable, steady workloads. Off-peak scheduling suits requests that can be delayed.
When planning, split monthly calls into three parts: steady load, deferrable load, and burst load. Steady load fits within the subscription quota. Deferrable load runs during off-peak hours. Burst load is billed pay-as-you-go. After splitting, check whether the subscription quota goes unused for long periods, since unused prepaid quota is wasted.
5. Cost Estimation Method
The following example uses hypothetical numbers to show the calculation. Assume the standard input price is 10 CNY per million tokens, a cache hit costs 1 CNY per million tokens, a cache write costs 12.5 CNY per million tokens, and output costs 40 CNY per million tokens. In one month, there are 100 million input tokens: 60 million are cache hits, 10 million are cache writes, and the remaining 30 million are uncached standard input. Output totals 20 million tokens.
Without caching, input costs 100 million tokens at 10 CNY per million tokens, or 1,000 CNY. Adding 800 CNY for output brings the total to 1,800 CNY.
With caching, cache hits cost 60 CNY, cache writes cost 125 CNY, and standard input costs 300 CNY. Output remains 800 CNY, for a total of 1,285 CNY. Compared with no caching, this saves about 29%.
This result applies only to the assumptions above. If the hit rate drops, writes become more frequent, or a platform charges more for writes, the savings percentage changes.
We recommend four steps for the estimate:
- Count input and output tokens by request type.
- Estimate the cache hit rate, write volume, and the share of offline batch work.
- Apply each platform’s pricing rules to calculate costs.
- Compare platforms using the same set of historical requests, not averages alone.
6. Recommendations by Scenario
How to choose: start with the call pattern
- Pay-as-you-go only, with no lock-in requirement: compare unit prices, free quotas, rate limits, and technical support across platforms. When unit prices are equal, these other factors often decide the choice.
- Heavy offline workloads: first check the eligibility conditions and completion deadlines for batch discounts.
- Mainly real-time calls with stable volume: compare subscription quotas, overage rules, and off-peak windows, then validate with historical data.
- Existing workloads on a cloud provider: consider connecting from the same cloud. Network latency, private network connectivity, unified accounts, and permission management all affect operating costs. Whether to migrate depends on your service-level requirements and the cost of downtime, so evaluate each item.
Common mistakes
- Comparing only list prices and ignoring cache write and output costs;
- Treating an assumed cache hit rate as an actual value;
- Ignoring queue wait time for batch jobs;
- Buying more subscription quota than needed, which then goes unused;
- Not monitoring usage details, so anomalies are discovered only when the bill arrives.
7. Model Lifecycle and Regional Differences
Model versions keep changing. Older versions may stop accepting new users or be retired on a set date. Monitor provider announcements and leave time for migration. A new version’s capabilities and pricing may differ from the old one, so run regression tests on real samples before migrating.
Regional differences also belong in total cost. Unit prices can vary by region, and cross-border data transfer may incur network charges. For workloads involving cross-border data transfer, confirm data residency and compliance requirements before comparing prices.
8. Conclusion
LLM API cost depends on how billing rules combine. The unit price is only one factor. Take these steps in order:
- Map your workload’s call patterns and separate real-time, offline, and deferrable requests.
- Use historical usage to estimate cache hit rate, write frequency, and the offline share.
- Check the latest provider documentation and verify caching, batch, subscription, and off-peak rules one by one.
- Include the cost model in your budget, and review usage and pricing pages once a quarter.
Final results depend on your actual data. Test with small traffic first, then decide whether to scale purchases.
