Why LLM API Bills Can Differ by 50% at the Same Token Price
Token unit prices are only one factor in an LLM API bill. This article breaks the monthly bill into usage, unit price, rule-based discounts, subscription fees, and free-tier credits, then examines the levers that actually drive cost: model tier selection, batch processing, subscriptions with off-peak scheduling, prompt caching, and deployment region. It includes a cost estimation function, a scheduling policy example, and a practical checklist for reducing spend without changing providers.
1. The Starting Point: Same Unit Price, Different Bills
When evaluating LLM APIs, many teams treat “price per million tokens” as the only comparison metric. A real bill, however, is the result of multiple factors: unit price is just one multiplier, and what actually determines spend is how billing rules combine. When list prices are identical across platforms, the entire cost difference shifts to the rules layer, and a bill that differs by half is not surprising.
Abstracting the bill into a formula makes the problem clear immediately:
Monthly bill = Σ(token usage per category × corresponding unit price × rule discount) + fixed subscription fee - free-tier creditswhere token usage = input (cache miss) + input (cache hit) + cache write + output
Of the four variables, only “unit price” is public and highly convergent across vendors. The other three—rule discounts, fixed subscription fees, and free-tier credits—are where platforms genuinely diverge. Ignoring them leads to the wrong conclusion that “it doesn’t matter which one you pick.”
2. Cost Baseline: Understand the Token Mix First
Take three common model tiers as an example (a flagship reasoning model, an enhanced reasoning model, and a code-specialized small model). Pay-as-you-go prices typically follow a fixed ratio: the flagship tier is about 1.5x the enhanced tier, and the code small model is about one-third of the flagship tier; cache hit prices are generally one-tenth of the input price. This ratio structure is highly consistent across public pricing pages from multiple platforms (the figures here are illustrative; refer to each platform’s current pricing page for actual numbers).
This yields three practical takeaways:
- Output share determines tier sensitivity. Output tokens usually cost 5x input tokens, so the higher the output share, the steeper the marginal cost of moving to a higher tier.
- Cache hits are the cheapest tokens. The hit price is only 10% of the input price, which benefits long system prompts, fixed tool descriptions, and repeated Q&A over long documents the most.
- Tier selection matters more than platform selection. When unit prices are structurally identical, switching from the flagship model to the enhanced model saves far more than switching platforms.
An illustrative cost estimation function:
def estimate_cost(in_tok, out_tok, hit_ratio, price, batch_rate=1.0, cache_write=0):p_in, p_hit, p_out = price # unit: CNY per million tokensbillable_in = in_tok * (1 - hit_ratio)return (billable_in * p_in+ in_tok * hit_ratio * p_hit+ out_tok * p_out+ cache_write * p_in) * batch_rate / 1_000_000
3. Source of Difference #1: Batch Processing (The Half-Price Channel for Offline Jobs)
Batch processing is a dedicated channel for asynchronous jobs: the caller submits a job, the platform queues and executes it, and results are typically returned within 24 hours. The tradeoff is losing real-time response; the benefit is being billed at a percentage of the standard price (commonly 50% to 60% in the industry). It suits log labeling, batch summarization, offline extraction, evaluation runs, and data cleaning and synthesis.
Engineering considerations:
- Batch and real-time calls should be governed in separate queues to avoid mistakenly routing interactive requests to the asynchronous channel.
- Batch results still incur output token charges. For long-output jobs, the discount benefit is diluted by output cost, so each job profile needs separate accounting.
- Not all platforms offer batch discounts, and some pricing pages do not mention them at all. Confirm each item during selection rather than assuming it exists.
4. Source of Difference #2: Subscriptions and Off-Peak Usage (Trading Fixed Fees for Variable Usage)
A subscription (token package) essentially exchanges a fixed monthly fee for a token quota pool, with usage beyond the pool settled pay-as-you-go. The mathematical condition for it to pay off is:
If monthly actual usage × pay-as-you-go unit price > subscription fee + overage usage × pay-as-you-go unit price, then the subscription is cheaper
Layering in off-peak rules amplifies the benefit further: scheduling deferrable batch calls into low-traffic windows, combined with the subscription quota, can save close to half in measured terms; comparing only “subscription + overage” against “pure pay-as-you-go” typically yields 12% to 24% savings. Making this work depends on two things: jobs must be deferrable (offline-first), and the scheduler must support time-windowed queues.
# Scheduling policy example: push deferrable jobs into off-peak windowspolicies:- name: interactivequeue: realtimemodel_tier: enhanced- name: batch_nightlyqueue: offpeak # executed during off-peak hourswindow: "18:00-08:00"model_tier: flagshipbatch: true
5. Three Rules That Are Easy to Overlook
- Automatic cache billing and write fees. Repeated prefixes usually enable caching automatically, with a default lifetime of about 5 minutes; longer lifetimes (such as 1 hour) incur separate cache write charges. After a hit, only the hit price applies, but frequently changing prefixes let write fees eat the hit savings, so prefixes should be “stable and long.”
- Older-generation model retirement. Vendors stop opening the previous generation to new users and gradually phase it out, generally recommending migration to the enhanced version. Architecturally, model identifiers should be configuration items so switching remains possible.
- Non-primary region premiums. The same model may cost about 10% more in a non-primary region, so cross-border workloads that accidentally land in an overseas region see costs rise out of nowhere.
6. Selection Checklist and Governance Actions
- Do not lock in a single flagship model: default to the enhanced tier and upgrade only high-value requests.
- Route all offline jobs through the batch channel, keeping only interactive requests on the real-time path.
- Evaluate subscription + overage for stable workloads and keep pure pay-as-you-go for spiky ones; recalculate the break-even point every quarter.
- Establish cache-friendly conventions: system prompts first, variables last, and include prefix length and stability in reviews.
- Align deployment region with the business region to avoid cross-border premiums.
- Consolidate multiple platforms behind a unified gateway, making model identifiers, billing modes, timeouts, and retries configuration-driven to avoid vendor lock-in.
- If you already use relevant Baidu AI Cloud products, you can rely on unified logging, monitoring and alerting, and container platforms to aggregate usage and build cost dashboards, reducing the operational burden of a self-built metering pipeline.
7. Conclusion
Convergent unit prices are the industry norm; cost competitiveness comes from applying the rules: tier selection, batch processing, subscriptions with off-peak scheduling, cache hit rate, and deployment region. Stacked together, these five levers can make monthly bills differ by half for the same usage. The right approach is not to find the “cheapest platform” but to understand your usage mix and then use scheduling and configuration to land costs in the optimal range of the rules.
