LLM API Pricing Tiers and Model Selection: A Practical Guide
This guide explains why LLM API prices vary by up to 50x within the same model category, how input and output token billing shapes real costs, and how to choose between economy and flagship tiers. It covers cost calculation per business request, a four-dimension selection framework, six cost-reduction techniques, an abstraction layer to avoid tier lock-in, observability metrics, common pitfalls, and a rollout checklist.
1. The Phenomenon: Same Model Category, 50x Price Gap
Put the public prices of mainstream LLM services side by side and one easily misread fact stands out: among models all labeled as domestic Chinese LLMs, output pricing ranges from RMB 2 to RMB 100 per million tokens, roughly a 50x spread between the highest and lowest, while input pricing ranges from RMB 6 to RMB 20. Looking only at the average leads to the conclusion that domestic models are getting more expensive; looking only at the low end leads to the conclusion that they are still dirt cheap. Neither judgment is accurate.
A closer description is that the market is stratifying. One layer is the low-price tier for large-scale everyday calls, optimized for low enough unit cost to support high concurrency, long context, batch summarization, classification, and extraction. The other is the high-price flagship tier for complex reasoning, code generation, and agent orchestration, trading a higher unit price for deeper reasoning and longer task persistence. The price gap is not a moral judgment of expensive versus cheap; it reflects different capability positioning and different resource consumption structures.
2. Why Output Costs More Than Input: Reading the Billing Structure
Mainstream billing usually prices input tokens and output tokens separately, with output unit price several times the input price. The reason is not mysterious:
- The input stage can be processed in parallel; a single forward pass covers the entire prompt.
- The output stage is autoregressive, advancing token by token, and every step must read the full context state, so compute and memory-bandwidth pressure accumulate with context length.
- Under long context, the repeated-read cost of the output stage is significantly higher than that of the input stage.
This yields a practical conclusion: the first priority for cost control is not trimming prompt length, but trimming output length and the number of repeated calls. For a task with a 32K context and 4K output tokens, the cost is often dominated by those 4K output tokens.
3. Two Product Lines in a Tiered Market
The low-price tier is typically characterized by low unit price, high throughput, and moderate context, suited to tasks that can be validated, retried, and parallelized, such as text classification, field extraction, tagging, reranking retrieval results, and log summarization.
The high-price flagship tier is typically characterized by high unit price, long reasoning chains, and more stable tool calling and multi-turn persistence, suited to tasks where errors are costly, such as complex code refactoring, math and logic derivation, long-running agents, and cross-document consistency checks.
The correct engineering approach is not either/or but routing: let the low-price tier handle more than 80% of traffic and reserve the flagship tier for the 5%-20% that genuinely needs it.
4. Cost Estimation: Converting Quotes into Cost per Business Request
Do not stop at “how much per million tokens”; convert to “how much per thousand business requests.” The abstract formula is:
cost per call = input tokens × input unit price+ output tokens × output unit price+ retry count × cost per callbusiness unit price = cost per call × daily call volume
Illustrative calculation (prices are assumed values for explanation only):
Scenario A, classification: input 1500, output 50Economy tier: 1500×0.006/1000 + 50×0.024/1000 ≈ 0.0102 RMB/callScenario B, code: input 8000, output 2000Flagship tier: 8000×0.009/1000 + 2000×0.027/1000 ≈ 0.126 RMB/call
At 100,000 calls per day, Scenario A costs on the order of a thousand RMB per day, while Scenario B, if all traffic goes to the flagship tier, can reach the order of ten thousand RMB per day. The gap comes from output length and tier choice, not from “model price increases.”
5. Selection Framework: Scoring on Four Dimensions
- Error cost: can mistakes be automatically validated and retried? Validatable tasks can go to the low-price tier.
- Context shape: long documents and multi-turn tool calling favor the flagship tier.
- Latency budget: interactive scenarios must evaluate both time to first token and throughput.
- Compliance and data boundaries: whether private or dedicated deployment is required.
Fix the scoring results as configuration rather than scattering them across business code:
routing:classify: { tier: economy, max_output: 128, retry: 1 }summarize: { tier: economy, max_output: 800, cache: true }codegen: { tier: flagship, max_output: 4096, retry: 2 }agent: { tier: flagship, max_output: 2048, tools: true }
6. Six Cost-Reduction Techniques
- Output truncation and structured constraints: replace free-form long text with schema constraints to cut invalid output directly.
- Prefix caching: put stable system prompts and knowledge snippets in the prefix; reuse significantly reduces repeated input overhead.
- Batching and asynchronous queues: send offline tasks through batch channels, trading time for price.
- Semantic caching: reuse results for high-frequency similar requests; hit rates are usually higher than intuition suggests.
- Distillation and smaller-model substitution: push validatable tasks down to smaller models.
- Budget guardrails: set daily quotas and circuit breakers per tenant and per endpoint to prevent runaway loops from burning money.
7. An Abstraction Layer: Avoid Being Locked into a Single Tier
Wrap model access in a unified gateway so the business depends only on capability interfaces, not on a specific tier:
def chat(task: str, payload: dict) -> str:plan = ROUTES[task] # tier and parameters come from configfor attempt in range(plan.retry + 1):resp = gateway.call(plan.tier, payload,max_output=plan.max_output)if validate(resp, plan.schema):return respreturn fallback(task, payload)
The benefit is that price changes, tier switches, and canary migrations become configuration changes with no business code changes, and A/B cost comparisons become easy.
8. Observability: Treat Cost as a First-Class Metric
Collect four categories of metrics at the same time: token usage (input and output listed separately), cost per call and business unit price, cache hit rate, and retry and failure rates. Only by looking at output tokens separately can you locate cost anomalies; only by putting retry rate on the dashboard can you spot the hidden burn caused by prompt defects. General capabilities on cloud platforms such as Baidu AI Cloud, including log services, monitoring and alerting, and message queues, can be used to build such cost dashboards and asynchronous batch channels; refer to the official documentation for specific integration steps.
9. Common Pitfalls
- Looking only at unit price and not output length, which distorts the budget.
- Sending all traffic to the flagship tier “for safety,” which loses cost control.
- Ignoring the retry amplification effect: one failure equals paying twice.
- Treating caching as a cure-all while ignoring consistency requirements.
- Replacing multi-step decomposition with one long prompt, which actually raises total input and output.
10. Rollout Checklist
- Build a two-week usage profile first, measuring the input/output distribution.
- Establish routing configuration and capability interfaces.
- Ship budget guardrails and the cost dashboard.
- Absorb deferrable tasks with offline batch processing.
- Re-review tiers and price changes every quarter and re-score.
Conclusion: in the paid era, the competitive focus has shifted from “unit price” to “cost efficiency per unit of business value.” Whoever decomposes tasks accurately, controls output tightly, and tunes routing dynamically will get a better cost curve in a tiered market.
