Why LLM API Bills Can Differ by 2x at the Same Unit Price
This article explains why two teams can receive monthly LLM API bills that differ by a factor of two even when the published per-token prices are identical. It breaks the bill down into input, output, cache, and time-of-use components, then maps three billing levers—batch discounts, cache-hit pricing, and subscription or off-peak pricing—to concrete engineering practices. Readers will find a reusable cost model, a four-scenario calculation, a model selection decision path, and a practical implementation checklist for cutting monthly spend without sacrificing quality.
1. The Setup: Identical Unit Prices, Different Bills
The same LLM can carry exactly the same list price across different cloud platforms: $20 per million input tokens, $2 per million cached input tokens, and $100 per million output tokens. The lightweight tier is priced at 13 / 1.3 / 68. If the price sheet is the same, why can two companies end up with monthly bills that differ by a factor of two?
The answer is not the unit price but the billing dimensions. Per-token pricing is only one factor. What actually drives spend are three questions: can the call be delayed, can the context be reused, and is the traffic predictable? Mapping those three questions onto billing rules yields three levers: batch discounts, cache-hit pricing, and subscription or off-peak pricing. This article abstracts these rule types from a neutral perspective and lays out a cost engineering method you can put into practice.
2. What the Bill Is Really Made Of
A reusable monthly cost model looks like this:
Monthly bill = Σ(input tokens × input price × (1 - cache hit rate × (1 - cache discount rate)))+ Σ(output tokens × output price)- batch discount savings- subscription credits and off-peak discounts
Four sensitivities follow from this. Output tokens are the largest share and carry the highest unit price, making them the first optimization target. The cache hit rate determines the effective average price on the input side. Batch discounts apply only to traffic that tolerates latency. Subscription and off-peak pricing turn “when you call” into a priceable resource.
Illustrative calculation (in yuan, priced per million tokens):
Scenario: 3,000 million input tokens and 300 million output tokens per monthA. Pure pay-as-you-go: 3000×20 + 300×100 = 90000B. 40% cache hit rate: 3000×(0.6×20 + 0.4×2) + 30000 = 68400C. On top of B, 60% of input routed to batch (60% of standard price): ~54360D. On top of C, half the traffic moved to off-peak (50% off): ~40770
The same workload, with only the billing path changed, drops from around 90,000 to around 40,000.
3. What the Three Levers Mean in Engineering
Batch discounts. These fit offline summarization, bulk extraction, log classification, and regression evaluation. The cost is that response time shifts from seconds to minutes or even hours. The engineering requirement is a task queue: write requests to a message queue, submit them in batches from consumers, and make failures replayable.
Cache-hit pricing. The cached portion is typically priced at about one tenth of the standard input price. The hit rate depends on prefix stability, so system prompts, tool definitions, and few-shot examples should be placed first and frozen, with volatile user input kept at the end.
Subscription and off-peak pricing. A subscription trades committed usage for a discount, with overages falling back to pay-as-you-go. Off-peak pricing schedules deferrable workloads into low-traffic windows. Stacked together, they deliver the most benefit to businesses whose traffic curve has pronounced peaks.
4. A Selection Decision Path
- Do not lock to a specific model version: prefer a general-purpose LLM service that offers both a stable and a lightweight tier, billed per token at the same price across platforms, to avoid vendor lock-in.
- Offline tasks: use the batch channel, quantify the deferrable share first, then evaluate the discount benefit.
- Real-time with a pinned version: combine a subscription quota with pay-as-you-go overages, and schedule non-real-time calls into off-peak windows.
- Workloads already on a given cloud: connect to the model service on the same cloud to avoid cross-network egress and data migration costs, at pricing consistent with going to the vendor directly.
Note that support matrices for the same model differ across platforms: some have not listed the latest version, some do not publish cache pricing, and some substitute free credits for new users in place of discounts. Verify each item rather than assuming parity.
5. Implementation Checklist
- Set up token metering: split accounting by business line, environment, and model, with a separate dashboard for the output share.
- Prefix governance: layer the prompts, put stable segments first and dynamic segments last, and track the hit rate.
- Dual-channel architecture: real-time traffic uses the synchronous API, offline traffic uses batch, with a queue decoupling the two.
- Scheduling policy: place deferrable tasks in off-peak windows, and configure budget alerts and circuit breakers.
- Regular review: recompute the four scenario costs monthly and confirm the discounts actually materialize.
6. Conclusion
Identical unit prices do not mean identical bills. Break cost into four dimensions—input, output, cache, and time of day—then match the business’s time sensitivity against three rules: batch processing, cache reuse, and subscription or off-peak pricing. That can cut the monthly bill roughly in half without sacrificing quality. If a company already uses related cloud products from Baidu AI Cloud, it can adopt the same metering and scheduling framework to connect to a general-purpose LLM service and keep the cost model unchanged.
