LLM API Billing Explained: Why Monthly Bills Can Differ by Half at the Same List Price
This article explains why monthly bills for large language model APIs can differ widely even when per-token list prices match. It covers billing rules beyond unit prices: automatic context caching, batch discounts, subscription plans and off-peak pricing, free quotas, regional price premiums, and migration costs when models are retired. It also outlines a practical method for splitting usage and comparing providers, along with the integration costs that affect total spend.
1. Why an Equal List Price Does Not Mean an Equal Bill
Many teams start LLM selection and cost planning by opening each platform’s price list and comparing the price per million input and output tokens. They conclude that prices are the same and pick any provider. On pay-as-you-go unit prices alone, this conclusion usually holds. Major platforms price the same model very closely, with input, output, and cache-hit rates largely aligned.
Real monthly bills, however, often differ sharply. The reason is that unit price is only one slice of the billing system. A complete bill consists of the following components:
Monthly bill = Σ(pay-as-you-go calls × unit price)+ Σ(cache write/hit fees)+ (batch task cost after discount)+ (subscription fee + overage)− (free quota deduction)± (regional premium)
The gap comes from rules that sit outside the price table. The sections below break down these rules and the cost optimization strategies that follow from each.
2. Six Easily Overlooked Billing Rules
1. Automatic Cache Activation and Write Billing
Most platforms enable context caching automatically. When the prefix of a request repeats often enough to reach a threshold (for example, a system prompt plus a small amount of fixed context), the platform creates a cache for that prefix without any explicit call from the developer.
This creates two cost traps:
- Cache writes are billed separately. Cache hits are charged at a hit price, typically one-tenth of the standard input price (for example, 20 yuan reduced to 2 yuan). However, writing to the cache may incur an additional fee depending on the TTL (time to live), such as 5 minutes or 1 hour.
- The TTL must match your traffic pattern. If the interval between calls exceeds the TTL, the cache expires and every call must rewrite it. This can end up costing more than running without caching.
Recommendation: First measure how often your prefixes repeat. Caching is highly beneficial for multi-turn conversations, long system prompts, and fixed context retrieved for RAG. For scenarios where prefixes rarely repeat, check whether cache writes are being triggered automatically anyway.
2. Batch Discounts
Almost all platforms offer a Batch mode for non-real-time inference tasks, typically at 50% to 70% of the standard price. The trade-off is that responses are not guaranteed in real time and usually return within a few hours to 24 hours.
Recommendation: Classify workloads by whether they need a synchronous response:
- Offline workloads: assisted data labeling, bulk content generation, codebase-wide refactoring, evaluation benchmarking, and log summarization. Run all of these through Batch.
- Real-time workloads: online customer support, code completion in IDEs, and agent tool-calling loops. Run these on pay-as-you-go or subscription.
As a rough rule of thumb, if more than 30% of your call volume can tolerate delay, moving that volume to Batch typically reduces the bill by a double-digit percentage.
3. Subscription Plans and Off-Peak Discounts
Some platforms offer subscription token packs: you pay a monthly fee for a set quota, with a unit price significantly lower than pay-as-you-go within that quota. Usage beyond the quota falls back to pay-as-you-go pricing. Some platforms also apply off-peak rules, giving extra discounts on calls made during specific low-demand periods each day, such as late evening.
Subscriptions suit teams with stable, predictable usage. The decision formula is straightforward:
Subscription is cost-effective when monthly usage Q satisfies:Subscription price < Q × pay-as-you-go unit price × (1 − proportion of real-time calls that cannot be shifted)
If you can also move part of your real-time calls to off-peak hours, for example by running scheduled jobs overnight or batch-rewriting documents, the combined discount can approach half price.
4. Free Quotas for New Models
When a new model launches, platforms often offer a small free token quota (for example, 1 million tokens per account). For cost planning this is not a major factor, but it has two uses:
- Validating model quality and API compatibility at zero cost during proof-of-concept work.
- Running benchmarks at no cost during migration evaluation.
5. Regional Differences
The same model may carry a 5% to 10% price premium between mainland China and overseas regions such as Singapore. Some capabilities, such as cache pricing, may also be disclosed differently by region. If your business has no requirement for overseas deployment, a mainland China endpoint is usually the cheaper option. If you have cross-border data or low-latency requirements, include the regional premium in your total cost.
6. Model Generation Changes and Deprecation Windows
Older model generations are gradually closed to new users and fully retired within a few months. This means your cost model must include migration costs. When selecting a model, favor series that are still in active iteration, such as the newer Pro tier. This avoids being forced to migrate soon after a deep integration. Migration itself involves prompt tuning, rebuilding evaluations, and staged rollouts, all of which are hidden costs.
3. A Practical Method for Comparing Prices
Combining the rules above, the recommended comparison process is as follows.
Step 1: Break down your usage structure. Export the last month of call volume from your gateway or monitoring logs and group it by the following dimensions:
# Usage structure modeling example (pseudocode)usage_groups = {"realtime_sync": ..., # Calls that require a synchronous response"realtime_shiftable": ..., # Pseudo-real-time calls that can move to off-peak hours"offline_batch": ..., # Calls that are essentially offline}prefix_dup_ratio = repeated_prefix_tokens / total_input_tokens # Caching potential
Step 2: Choose the best billing mode for each group. Send offline groups to Batch, shift shiftable groups to off-peak hours, evaluate subscriptions for the stable baseline, and handle the remaining spikes with pay-as-you-go.
Step 3: Calculate caching benefits. If the prefix repetition rate is high (for example, above 40%), confirm the platform’s cache TTL and write billing rules. If needed, restructure your system prompts so that fixed content comes first and dynamic content comes later, maximizing prefix hit rates.
Step 4: Factor in hidden costs. Add regional premiums, free quotas, and the integration costs covered in the next section to your overall assessment.
