LLM API Billing Discrepancies: Why the Same Unit Price Can Cost Half as Much
When comparing Large Language Model (LLM) APIs across different platforms, teams often find that identical unit prices result in monthly bills that vary by up to 50%. This article breaks down the root causes behind these discrepancies, introducing the concept of "effective price" and analyzing differences in billing dimensions, discount rules, and task scheduling. It provides a practical framework for reading price lists, calculating monthly costs, and outlines a five-step implementation guide to help developers optimize their API spending and avoid common billing pitfalls.
LLM API Billing Discrepancies: Why the Same Unit Price Can Cost Half as Much
1. The Problem is “Effective Price,” Not Unit Price
When conducting multi-platform price comparisons for LLM APIs, many teams only compare the input price per million tokens, cache hit price, and output price. This often leads to a seemingly contradictory phenomenon: several platforms have exactly the same pay-as-you-go list price, yet after running continuously for a month, the monthly bills can differ significantly—by as much as half in extreme cases.
The reason is not complicated: the list price only describes the unit cost of a “standard pay-as-you-go call,” while the monthly bill is determined by billing dimensions, discount rules, subscription coverage, idle-time scheduling, free credits, regional pricing coefficients, and cache hit rates. Looking only at the unit price is like looking at the price per liter of fuel for a car, without considering road conditions, payload, or whether you took a toll discount lane.
We can define the core metric as the “effective price”:
Effective Price = Total Monthly Bill / Actual Processed Volume
The actual processed volume can be measured by input tokens, output tokens, or weighted tokens, but it must be consistent with the billing basis. A lower effective price indicates a better match between the billing rules and the business workload. Identical prices leading to different bills usually stem from three layers of differences:
- Billing Dimension Differences: Whether input misses, cache hits, cache writes, and outputs are priced separately; an item not listed on the pricing page does not mean it is free.
- Rule Layer Differences: Batch processing discounts, subscription plan coverage, idle-time discounts, one-time free credits, and regional price coefficients.
- Scheduling Layer Differences: Cache hit rate, proportion of deferrable tasks, baseline-to-peak ratio, and model version migration costs.
Therefore, the correct comparison sequence is not “choose a platform first, then calculate the bill,” but rather “profile usage first, normalize prices next, and finally combine the rules.”
2. How to Read the Price List: Three Tiers are Just the Starting Point
A typical LLM API price list contains at least three tiers: input cache miss, cache hit, and output. Some platforms also list cache write pricing separately or charge based on different cache TTLs. Below is a neutral example illustrating the price structure. The values are relative multipliers, provided solely to demonstrate the methodology and do not represent any actual quotes:
| Model | Input Miss | Cache Hit | Output | Notes |
|---|---|---|---|---|
| Model A | 1.0x | 0.1x | 5.0x | When output dominates the bill, cache optimization yields limited benefits |
| Model B | 0.65x | 0.065x | 3.4x | Lower unit price, but cache write and batch rules must still be reviewed |
| Model C | 1.0x | 0.2x | 4.2x | Code-based tasks require attention to output structure and retry costs |
When reading the price list, focus on confirming four things:
- Is caching automatically enabled?: Repeated prefixes might automatically enter the cache with a short default TTL; long TTLs often incur separate write fees. Upon a hit, only the hit price is charged, but the write cost cannot be ignored.
- How is cache write billed?: If your business has frequently changing prefixes and a low hit rate, long-TTL caching might actually increase costs.
- Output Price Weight: Output tokens are typically the most expensive. If your workload is heavily output-oriented, the absolute benefits of input cache optimization will be diluted.
- Unlisted Items: Just because a platform doesn’t list a cache price on its page doesn’t mean caching is free; you should confirm this through billing documentation or sample invoices.
The impact of caching on input costs can be estimated using a simplified formula. Assuming the input miss price is 1, the cache hit price is 0.1, and the hit rate is h, the effective input price is:
Effective Input Price = 1 × (1 - h) + 0.1 × h = 1 - 0.9h
Increasing the hit rate from 0 to 50% reduces the effective input price to about 0.55. However, if output costs account for 70% of the total bill, the overall bill reduction will be significantly smaller than the input reduction. Therefore, cache optimization must be calculated in the context of your usage structure, not just the hit rate metric alone.
3. Four Types of Platform Rule Differences: Why Identical Prices Yield Different Bills
In common multi-platform comparisons, the pay-as-you-go unit price for the same model might be identical, but the differences on the rules page will dictate the monthly bill. Below, Platforms A, B, C, and D abstractly represent four combinations of rules:
| Rule Dimension | Platform A | Platform B | Platform C | Platform D |
|---|---|---|---|---|
| Pay-as-you-go Price | Same as peers | Same as peers | Same as peers | Same as peers |
| Batch Processing | Proportional discount on standard price | Not stated on page | Not emphasized | Not emphasized |
| Subscription/Idle-time | Not emphasized | Not stated | One-time free credits | Subscription covers some models, includes idle-time rules |
| Primary Impact | Cheaper for offline tasks | Hidden rules need confirmation | Lower cost during new business launch | Cheaper for stable baseline + deferrable calls |
Even with identical pay-as-you-go unit prices, bill differences may arise from the following combinations:
- Platform A: Offline tasks go through batch processing, billed at a certain percentage of the standard price. As long as tasks can be asynchronous and tolerate longer latencies, a higher proportion of batch processing lowers the bill.
- Platform B: Batch processing or subscription rules are not stated on the page. You cannot assume they don’t exist, nor can you assume they do. This must be verified through sample invoices and small-traffic stress testing.
- Platform C: Offers one-time free credits. Suitable for cold-starting a new business, but it will not continuously dilute long-term costs. You cannot treat the first month’s bill as the long-term cost.
- Platform D: A subscription plan covers part of the baseline calls, with overages billed as pay-as-you-go. If combined with idle-time rules, scheduling deferrable calls into low-price windows can significantly reduce overall costs. In sample calculations, subscription plus overage pay-as-you-go can be 10% to 20% cheaper than pure pay-as-you-go. If about half the calls can be deferred to idle-time windows, the bill might nearly halve. The exact magnitude depends on coverage ratio, overage price, and idle-time discount, and cannot be directly copied.
This explains a key conclusion: identical prices only mean identical standard pay-as-you-go calls, not identical total cost of ownership. For real-time, non-deferrable, output-heavy workloads, differences between platforms might be minimal. For offline batch processing, stable baselines, and workloads with many deferrable tasks, the combination of rules can offer optimization spaces differing by an order of magnitude.
4. Monthly Bill Formula and Combined Calculation
A monthly bill can be broken down into “subscription fixed fee + overage pay-as-you-go fee + uncovered pay-as-you-go fee - deductions”. The pseudocode is as follows:
def estimate_monthly_bill(usage, prices, rules):# usage: input miss, cache hit, cache write, output, deferrable ratio, baseline ratiogross = (usage.input_miss * prices.input_miss+ usage.cache_hit * prices.cache_hit+ usage.cache_write * prices.cache_write+ usage.output * prices.output)# Batch processing only applies to the offline partbatch_part = gross * usage.batch_ratio * rules.batch_factorrealtime_part = gross * (1 - usage.batch_ratio)# Idle time only applies to the deferrable partidle_part = (batch_part + realtime_part) * usage.idle_ratio * rules.idle_factornormal_part = (batch_part + realtime_part) * (1 - usage.idle_ratio)after_rules = idle_part + normal_part# Subscription covers baseline, overage is pay-as-you-go; free credits applied oncecovered = min(after_rules, rules.subscription_cover)over = max(0, after_rules - covered)bill = rules.subscription_fee + over * rules.overage_factor - rules.free_creditreturn max(bill, 0)
Example assumption: Total input is 1000 units, output is 200 units, input price is 1, cache hit price is 0.1, output price is 5, and cache hit rate is 40%. The bill without caching is:
1000 × 1 + 200 × 5 = 2000
After enabling caching:
600 × 1 + 400 × 0.1 + 200 × 5 = 1640
This is a reduction of about 18%. If half of the tasks can be batch processed with a batch factor of 0.6, the bill can drop further to about 1312, a cumulative reduction of about 34%. If subscription baseline coverage and idle-time scheduling are added, the reduction might continue to expand. Note that these numbers are merely methodological demonstrations; real calculations must use actual prices, hit rates, and deferrable ratios.
5. Five-Step Implementation: From Pricing to Reconciliation
1. Collect a “Billable Usage Profile”
Do not just record total tokens. At a minimum, collect data segmented by model, region, time period, input cache miss, cache hit, cache write, output, retry count, deferrable ratio, and baseline/peak ratio. Without these fields, any billing calculation is just guesswork.
2. Normalize Price Metrics
Standardize currency, units, regional coefficients, and taxes. Convert the three-tier prices into relative multipliers. Confirm cache write prices, overage pay-as-you-go prices, and free credit validity periods. Unlisted items should be explicitly marked as “To Be Confirmed” and not treated as 0.
3. Calculate Effective Price
Calculate and compare the bills for five scenarios: pure pay-as-you-go, batch processing, subscription + overage, idle-time scheduling, and a hybrid solution. Compare the effective price, not the unit price. For output-heavy workloads, focus on output price and retry costs; for highly repetitive input workloads, focus on cache hit rate and write costs.
4. Small-Scale Validation
Conduct cache stress testing using real business prefixes to observe hit rates, TTLs, and write costs. Use offline queues to validate batch processing latency and failure retries. Use sample invoices to verify overage prices and free credit deduction order. Feed the stress test results back into the calculation model.
5. Establish Monthly Reconciliation
Monitor budget alerts, cache hit rates, batch processing proportions, subscription coverage, idle-time ratios, regional distribution, and model migration costs. Compare the actual bill with the predicted bill monthly. If the deviation exceeds a threshold, trace back to the specific billing items.
6. Commonly Overlooked Pitfalls
- Auto-enabled caching does not equal guaranteed savings: With low hit rates and frequently changing prefixes, cache write costs might offset the benefits.
- Unlisted does not mean free: Cache prices, overage prices, and regional price differences must all be confirmed.
- Free credits are one-time: A low first-month bill does not represent long-term cost efficiency.
- Subscription overage prices may differ from standard pay-as-you-go prices: You must check the unit price for the overage portion.
- Batch processing has boundaries: Latency-sensitive and interactive tasks cannot be forcefully batched.
- Retiring old models incurs migration costs: Code-based and tool-calling workloads require regression testing, and migration costs should be factored into the total cost of ownership.
- Regional price differences and compliance costs: Prices may vary by region, and cross-regional data flow also requires consideration of compliance and network latency.
- High output ratios limit cache benefits: Optimization focus should shift to output length control, structured output, and retry suppression.
7. Conclusion
Under identical pay-as-you-go unit prices, a monthly bill can differ by half. The fundamental reason is the varying degree of match between billing rules and business workloads. Batch processing discounts suit offline tasks, subscription coverage suits stable baselines, idle-time rules suit deferrable calls, and cache optimization suits highly repetitive prefixes. Meanwhile, one-time free credits, regional price differences, and model migration costs determine the long-term total bill.
Therefore, multi-platform price comparison should not stop at “how much per million tokens.” Instead, a closed loop of “usage profiling—price normalization—effective price calculation—small-scale validation—monthly reconciliation” should be established. Calculate the effective price before discussing platform selection; look at business deferrability and cache hit rates before discussing discounts. Only in this way can we explain identical prices yielding different bills and genuinely bring the monthly bill down.
