LLM API Pricing: Why Identical Token Rates Can Produce Monthly Bills That Differ by Half
Identical LLM API token rates do not guarantee identical monthly costs. This article explains how cache hit rates, cache writes, batch discounts, billing rules, regional pricing, and model migrations affect spending, with a practical estimation model, monitoring guidance, and a provider evaluation checklist.
LLM API Pricing: Why Identical Token Rates Can Produce Monthly Bills That Differ by Half
When comparing large language model services, many teams start with three rates on the public pricing page: input tokens, cached input tokens, and output tokens. If several providers or access channels list identical rates, choosing among them may seem financially irrelevant.
Actual monthly bills tell a different story. For the same business workload, one implementation may stay close to budget while another costs roughly 50% more—or beyond that.
The reason is straightforward: token rates are only the starting point. The bill depends on usage patterns, billing rules, and engineering implementation. This article examines the overlooked variables and outlines practical methods for estimating, monitoring, and comparing costs.
1. Pricing Tables Cover Three Dimensions; Bills Depend on Many More
Standard input, cached input, and output rates form the foundation of usage-based pricing, but they do not describe the entire cost structure. Monthly spending also depends on:
- The proportion of input tokens served from cache.
- Whether cache writes are billed separately and how pricing varies by time-to-live (TTL).
- Eligibility for asynchronous batch processing, off-peak processing, or subscription allowances.
- One-time free allowances for new models.
- Regional price differences.
- Whether system prompts, tool definitions, retrieval context, and conversation history all count as input.
- Charges for retries, failed requests, and interrupted streams.
- How effectively output length is controlled.
- Migration and regression-testing costs when older models are retired.
Instead of asking only “What is the price per million tokens?”, ask “What is the effective cost of useful tokens for my workload?”
A simple measure is:
Effective token rate = Total monthly cost ÷ Useful business tokens
Where possible, useful business tokens should exclude retries, unnecessary context, and repeatedly injected content. A lower effective rate indicates a more efficient cost structure.
2. Caching: Hit Rate, Write Cost, and TTL All Matter
Prompt caching typically applies to repeated prefixes. When requests share the same system prompt, tool descriptions, fixed reference material, or a long conversation history, the service may cache that prefix automatically.
Cached input is then billed at the lower cache-hit rate, while uncached input remains subject to the standard input rate.
Caching is not necessarily free to establish or maintain. Three factors require attention:
- Cache hit rate. A higher hit rate reduces input costs. Multi-turn conversations, fixed role prompts, and agent tool definitions often provide more opportunities for reuse. One-off batch requests, changing retrieval context, and frequently modified prompts tend to provide fewer.
- Cache write cost. Some implementations charge separately for writes, with TTL-based tiers such as five minutes or one hour. Frequent reuse can offset the write cost. Longer gaps between requests may cause short-lived entries to expire repeatedly, while longer TTLs may carry higher write charges.
- Expiration and matching rules. Cache reuse often requires an exact prefix match. A single changed character in a system prompt, reordered tool definitions, or an injected timestamp can prevent a hit.
A common budgeting mistake is to apply the cached-input rate to all input while overlooking uncached tokens and cache writes. At minimum, separate the estimate into:
- Uncached input tokens × Standard input rate.
- Cached input tokens × Cache-hit rate.
- Cache-write tokens × Cache-write rate, where applicable.
- Output tokens × Output rate.
If the pricing page does not explain cache writes or matching rules, treat them as items to verify—not as zero-cost assumptions.
3. Batch Processing, Off-Peak Rules, Subscriptions, and Free Allowances
Beyond caching, billing discounts are another major source of cost differences.
- Asynchronous batch processing: Some services offer discounts for non-real-time workloads. An illustrative arrangement might charge 60% of the standard rate. If the application can tolerate delayed results, batching can substantially reduce unit costs.
- Off-peak rules: Some subscription or billing plans provide discounts or allowances during specific time windows. Scheduling offline work into those windows may save more than prompt optimization alone.
- Subscription coverage: A subscription may include designated models or a usage allowance, with overages billed separately. Check model coverage, validity periods, concurrency limits, and overage rules.
- One-time free allowances: A new-model trial may include an allowance measured in millions of tokens. This can make the first month inexpensive without reducing steady-state costs. Exclude temporary credits when preparing a long-term budget.
These arrangements may leave the headline token rates unchanged while altering the amount actually paid. Convert applicable discounts into effective discount factors and incorporate them alongside cache hit rates.
4. Regional Pricing and Billing Definitions Create Hidden Differences
The same service may have different prices across regions. A deployment outside its primary market may cost more, and currency conversion, taxes, network transfer, and compliance requirements can also affect total spending.
For workloads routed across multiple regions, calculate a weighted cost using the share of requests sent to each region rather than relying on the default region’s pricing.
Billing definitions are equally important. Confirm:
- Whether system prompts, tool definitions, and retrieved context all count as input.
- Whether the full conversation history is resent with every request.
- Whether billable output includes reasoning tokens or tool-call arguments.
- How failed requests, retries, and interrupted streams are charged.
- Whether charges are calculated per request or aggregated daily or monthly.
- Whether free allowances cover cache writes and output.
Many apparent billing anomalies are not price changes. They result from repeated context injection, retry amplification, or uncontrolled output length.
5. Model Lifecycle and Migration Costs Belong in the Comparison
Older model families may move through stages such as closing access to new users, gradual retirement, and recommended migration.
Migration involves more than replacing a model identifier. It can require:
- Adapting prompts and tool definitions.
- Running regression tests and comparing results.
- Repeating concurrency tests and adjusting timeout and retry strategies.
- Planning staged rollouts and rollback procedures.
- Establishing a new cost baseline.
A team relying on an older model may enjoy stable token rates in the short term while accumulating migration costs and operational risk outside the API invoice.
Treat model lifecycle stability as part of the overall cost assessment.
6. Close the Loop with Observability and Budget Controls
Record the following fields for each request and aggregate them daily, weekly, and monthly:
- Model identifier, region, and business unit.
- Input tokens, cache-hit tokens, cache-write tokens, and output tokens.
- Batch, off-peak, and subscription eligibility or coverage.
- Retry count, failure reason, and request latency.
- Per-request cost and cost per business unit of work.
The following illustrative estimator uses rates in CNY per million tokens. An unknown cache-write rate must remain an unresolved pricing item rather than being assumed to be zero.
PRICE = {"input": 20, # CNY per million tokens"cache_hit": 2,"output": 100,"cache_write": None # Check the pricing page; do not assume 0 if unknown}def request_cost(prompt_tokens, hit_tokens, output_tokens,cache_write_tokens=0, batch_discount=1.0):miss_tokens = max(prompt_tokens - hit_tokens, 0)cost = (miss_tokens * PRICE["input"]+ hit_tokens * PRICE["cache_hit"]+ output_tokens * PRICE["output"])if PRICE["cache_write"] is not None:cost += cache_write_tokens * PRICE["cache_write"]return cost * batch_discount / 1_000_000
If cache-write pricing is unknown, the result is a partial estimate until that charge is confirmed. Discount eligibility must also follow the applicable billing rules.
A simplified monthly model is:
Monthly cost = Σ[(Uncached input × Input rate + Cached input × Cache-hit rate + Cache writes × Write rate + Output × Output rate) × Applicable batch/off-peak discount × Regional factor] − Eligible free-credit deductions
Token quantities must use the same units as the rates. For prices quoted per million tokens, divide raw token counts by one million.
Add budget alerts, cache-hit dashboards, output-length distributions, and retry-rate alerts. Request-level cost visibility is what makes it possible to explain why two monthly bills differ so sharply.
7. Example: Identical Workloads, Very Different Bills
Consider an illustrative high-performance model with the following rates:
- Standard input: CNY 20 per million tokens.
- Cached input: CNY 2 per million tokens.
- Output: CNY 100 per million tokens.
Workload A uses one million input tokens and 200,000 output tokens per month, with no cache hits.
Workload B has the same token volume, but an 80% input cache-hit rate. It also qualifies for batch processing billed at 60% of the standard cost.
For Workload A:
1 × 20 + 0.2 × 100 = CNY 40
For Workload B, before the batch discount:
0.2 × 20 + 0.8 × 2 + 0.2 × 100
= 4 + 1.6 + 20
= CNY 25.60
With the illustrative batch discount:
25.60 × 60% = CNY 15.36
Workload B costs less than half as much despite identical token volumes and headline rates.
This example excludes cache-write charges. If those charges are substantial, the estimate must be revised and the balance between TTL and reuse reconsidered.
8. Provider Evaluation Checklist
When comparing LLM services, verify:
- Are standard input, cache-hit, and output rates clearly specified?
- Are cache writes charged, and what TTL tiers and expiration rules apply?
- What discounts and restrictions apply to batch processing, off-peak tasks, and subscriptions?
- What do free allowances cover, when do they expire, and which charges can they offset?
- How do regional pricing and request routing affect cost?
- How are system prompts, tool definitions, retrieval context, and retries counted?
- Are failed requests and interrupted streams billable?
- What model lifecycle and migration guidance is available?
- Are detailed usage records, budget alerts, and billing exports available?
- Can unit costs be broken down by business unit, model, and region?
Conclusion
Identical token rates do not imply identical monthly bills.
A meaningful cost comparison must account for cache hit rates, cache-write charges, batch and off-peak rules, free allowances, regional differences, billing definitions, and model lifecycle risks.
Use effective token rates and cost per business unit of work to guide decisions. Combined with request-level monitoring and budget controls, these measures explain large billing differences and help reduce spending without sacrificing application quality.
