Large Language Model API Pricing Comparison and Selection Guide
This article explains why the lowest per-token price does not always result in the lowest bill, then presents a platform-agnostic framework for comparing LLM API costs. It covers aligning measurement units, currency, cache storage, and reasoning-output billing; five common pricing models; a monthly cost formula for five usage scenarios; and practical selection tips for online, batch, long-context, and multimodal workloads. Prices are illustrative, and readers should verify current rates in the official documentation of each platform.
1. Why the Lowest Unit Price Is Not Always the Lowest Bill
When calling large language model (LLM) APIs, developers often focus only on the price per million tokens. In practice, the final bill depends on several variables: the input-to-output ratio, cache hit rate, the share of reasoning output, whether batch processing is used, whether a prepaid credit subscription is involved, and off-peak scheduling. A channel whose list price is not the lowest may end up costing less per month because of stacked discounts and more favorable billing rules.
This article does not focus on any specific vendor product. Instead, it outlines a general cost-evaluation framework: first align the measurement basis, then break down the billing dimensions, and finally run scenario-based estimates to reach a selection conclusion. All prices mentioned here are illustrative values used to explain the methodology; refer to each platform’s official pricing page for actual rates.
2. Align the Measurement Basis: Four Variables to Reconcile
Before comparing prices across platforms, align the measurement basis; otherwise the comparison is meaningless.
- Token unit: Most mainstream platforms quote prices per million tokens, with input, output, and cache-hit reads usually priced separately.
- Currency and settlement: Some platforms price in US dollars, which may be slightly higher after conversion due to exchange rates and taxes.
- Cache storage fees: Some platforms offer time-limited free cache storage and charge only for cache-hit reads; others charge a separate storage fee.
- Reasoning-content billing: If the reasoning process of a reasoning model cannot be disabled, the reasoning content is generally billed as output, so actual output volume can be significantly larger than the final answer length.
3. The Billing Model Is the Real Differentiator
In a market where list prices have largely converged, the billing model is what truly separates options. Five common types are:
- Limited-time discounts: Direct official discounts are simple, but time-sensitive, so watch the promotion period.
- Batch discounts: Asynchronous batch processing usually comes with a fixed discount and suits offline tasks, at the cost of unpredictable latency.
- Subscription credit model: Prepayment buys credits, which may lower the effective unit price, but there is a risk of unused quota.
- Off-peak multipliers: Low-traffic periods are billed at a multiplier, suitable for batch workloads that can tolerate delay.
- Cache-hit discounts: Inputs that hit the cache are billed at a significantly lower price, which benefits long system prompts and fixed knowledge bases.
4. Monthly Cost Estimates for Five Scenarios
Assume monthly usage for five cases: lightweight trial, regular online business, long-context document processing, offline batch processing, and high-concurrency multimodal workloads. The calculation steps are:
Monthly cost = input tokens/1e6 * input price * (1 - cache hit rate)+ input tokens/1e6 * cache hit rate * cache price+ output tokens/1e6 * output price * reasoning inflation factor- discounts and credit offsets
The reasoning inflation factor is typically set to 2–3. For batch scenarios, multiply further by the batch discount; for off-peak tasks, multiply by the off-peak multiplier. Plugging the five scenarios into the formula shows which billing model saves the most in each case, rather than vaguely claiming that one channel is the cheapest.
5. Three Details That Are Easy to Overlook
- Cache hit rate drives long-prompt cost: The more stable the fixed system prompt and knowledge-base prefix, the greater the cache benefit.
- Reserve output capacity when reasoning cannot be disabled: Capacity planning and rate-limit thresholds should be designed around the inflated output volume.
- Price gaps within the same model family: A family usually has flagship, standard, and lightweight tiers, with price gaps of several times; routing tasks by difficulty is key to reducing costs.
6. Selection Checklist and Engineering Advice
- For online interaction, prioritize stability, rate limits, and regional latency; consider discounts second.
- For offline batch processing, prioritize batch processing and off-peak multipliers.
- For long-document scenarios, evaluate cache billing and context length first.
- For multimodal scenarios, pay attention to input file parsing and billing basis.
- Build a cost dashboard that groups tokens and fees by business line, and periodically review discount validity.
If an enterprise has already integrated accounts, networking, and permissions on a compliant cloud platform such as Baidu AI Cloud, it can use general monitoring and alerting, logging, and quota management capabilities to observe call volume and costs in one place, avoiding reconciliation difficulties caused by fragmented channels.
