Why Monthly LLM API Bills Differ Even When List Prices Match
The same model and usage volume can produce significantly different monthly API bills across providers. This guide breaks down the pricing variables behind the difference—including caching, batch processing, off-peak discounts, subscriptions, free credits, and tiered pricing—and provides a practical formula for comparing channels using the same workload. All prices and figures are illustrative only; refer to each provider’s current pricing pages, documentation, and contract terms for actual rates.
1. Break Down the Pricing Variables First
Usage-based API bills typically include the following variables:
- Input tokens: User prompts, system instructions, conversation history, and retrieved context all count as input.
- Output tokens: Content generated by the model. Most providers charge more for output than input, so businesses with a high output ratio are more sensitive to price differences.
- Cache-hit tokens: Repeated prefix content may be cached and charged at a lower rate when it is read again.
- Cache-write tokens: The initial write to a cache may incur a separate charge. Some providers price cache writes higher than standard input. If the subsequent cache-hit rate is low, caching can increase costs instead of reducing them.
- Batch processing: Offline tasks that can tolerate delays often qualify for discounts, but they may require a minimum submission volume or have a completion deadline.
- Off-peak pricing: Calls made during designated low-demand periods may receive a discount. The applicable time zone must be confirmed in the provider’s documentation.
- Subscription plans: A fixed monthly or annual fee covers a defined allowance, with additional usage billed separately.
- Free credits and tiered pricing: Promotional credits for new users may expire. Tiered pricing may be calculated based on monthly cumulative usage or on each individual request. These different rules can produce different results.
2. Monthly Cost Formula and Parameters
Define the parameters before applying the formula:
- I: Total monthly input tokens, measured in millions of tokens (M).
- O: Total monthly output tokens, measured in M.
- h: Cache-hit rate for input tokens.
- w: Percentage of cache-missed input that is written to the cache.
- b: Share of usage eligible for batch processing.
- d: Batch discount rate. For example, a 30% discount is represented as 30%.
- q: Share of usage occurring during off-peak periods.
- r: Off-peak discount rate.
- p_hit, p_write, p_input, p_output: Unit prices for cache hits, cache writes, standard input, and output, respectively, measured in currency units per million tokens.
- F: Fixed subscription fee. Set this to 0 if there is no subscription.
- C: Value of free credits applied to the bill. Set this to 0 if no credits are available.
The monthly cost can be estimated as:
Monthly cost = { I × [ h × p_hit + (1 − h) × w × p_write + (1 − h) × (1 − w) × p_input ] + O × p_output } × (1 − b × d) × (1 − q × r) + F − C
This formula assumes that batch and off-peak discounts can be combined. If a provider does not allow the two discounts to stack, apply only the larger discount and replace the corresponding factor. Tiered pricing must be calculated separately for each pricing band and then added together.
Example Calculation
Assume the following usage and prices. These figures are provided only to demonstrate the calculation method:
- I = 500M and O = 50M
- h = 60% and w = 50%
- Illustrative prices: input at 10 currency units, output at 40, cache hits at 2, and cache writes at 12.5 per million tokens
- b = 30% and d = 50%; q = 10% and r = 30%
- F = 0 and C = 0
The calculation is as follows:
- Cache-hit input: 500 × 60% = 300M, costing 300 × 2 = 600.
- Cache-missed input: 200M. Of this amount, 100M is written to the cache, costing 100 × 12.5 = 1,250.
- The remaining 100M of standard input costs 100 × 10 = 1,000.
- Total input cost: 600 + 1,250 + 1,000 = 2,850.
- Output cost: 50 × 40 = 2,000.
- Pre-discount subtotal: 2,850 + 2,000 = 4,850.
- Batch factor: 1 − 30% × 50% = 0.85, resulting in 4,122.5.
- Off-peak factor: 1 − 10% × 30% = 0.97, resulting in approximately 3,998.8.
The estimated monthly cost for this workload is therefore about 3,999 currency units. In this example, discounts reduce the bill from 4,850 to approximately 3,999. This demonstrates the calculation method only and does not represent the actual discount level of any provider.
Is a Subscription Worth It?
The total cost of a subscription can be estimated as:
Total subscription cost = F + max(0, monthly usage − included allowance) × overage price
Compare this result with the monthly usage-based cost. When usage is close to the included allowance, a subscription is often more predictable. When usage is significantly below the allowance, usage-based billing is usually cheaper. Any overage must be included in the total cost; evaluating only the fixed subscription fee can be misleading.
3. Comparing Four Types of API Channels
The following comparison is qualitative and does not include specific prices. For each channel, use the same workload and calculate every item with the formula above.
| Channel type | Typical characteristics | Pricing items to verify | Common risks |
|---|---|---|---|
| Model provider’s direct platform | Direct access to the model provider, faster model-version updates, and generally more complete documentation | Cache-write and cache-hit rules, batch and off-peak periods, and data-residency regions | Reliance on a single vendor; regional availability and rate limits require advance planning |
| Large cloud provider aggregation | Multiple models managed under one account, with cloud resources, networking, and billing potentially consolidated | How discounts stack under unified billing, resource-package deductions, and cross-region data-transfer charges | Model availability may vary by release timeline; detailed bills can make additional charges easy to overlook |
