LLM Token Pricing Models Explained: A Practical Guide to Cost Optimization
Token-based billing is now a critical factor in LLM API cost management. This article breaks down the three dominant pricing models—flat-rate pricing, tiered pricing by input length, and context caching discounts—then walks through a real cost comparison using actual usage numbers (509.8K input tokens, 8.125K output tokens, 467.3K cache-write tokens) to show how costs can differ by an order of magnitude for the same workload. It concludes with five actionable cost optimization practices, including usage profiling, maximizing cache hit rates, trimming unnecessary context, task-based model routing, and bill-level monitoring, helping teams choose the right model based on their own usage patterns rather than headline prices.
1. Why Token Pricing Deserves Serious Attention
As large language models move into production at scale, API costs have become an unavoidable part of technology selection. Many teams focus only on model capability during evaluation, and only discover when the monthly bill arrives that the same workload can cost several times more under a different pricing structure.
Understanding token billing comes down to three things:
- Billing unit: Major providers price per million tokens (per 1M tokens), with input and output billed separately. Output tokens are usually priced significantly higher than input tokens.
- Pricing structure: Is it a flat rate or tiered pricing? Are there caching discounts? Is there an extra fee for writing to the cache?
- Your actual usage distribution: Is your workload “long input, short output” (e.g., document Q&A, code review) or “short input, long output” (e.g., content generation)? This directly determines which model is more cost-effective for you.
Let’s look at each in turn.
2. Breakdown of Mainstream Pricing Models
2.1 Flat-Rate Pricing
This is the simplest model: regardless of how long a single request’s input is, input tokens are billed at a uniform rate, and the same applies to output. Several leading overseas models and some high cost-performance models use this approach.
Advantages: Highly predictable costs, making budgeting and capacity planning straightforward.
Disadvantages: No price elasticity for very long contexts—the marginal cost of long-text calls stays high.
2.2 Tiered Pricing
Some models use tiered pricing based on input length: the more input tokens a single request contains, the higher the tier it falls into, and the unit prices for both input and output rise accordingly. A typical three-tier structure looks like this:
| Input Tier | Input Price (per 1M tokens) | Output Price (per 1M tokens) |
|---|---|---|
| ≤32K | ¥2.5 | ¥10 |
| 32K–128K | ¥4 | ¥16 |
| 128K–252K | ¥7 | ¥28 |
Note that the highest tier’s unit price is nearly 3x the lowest tier’s. This means: if your workload frequently triggers very-long-context calls, the actual cost of a tiered-pricing model will be far higher than the “starting price” first suggests.
When evaluating such models, don’t just look at the lowest tier. Instead, profile your input length distribution and calculate a weighted average unit price.
2.3 Context Caching Discounts
When multiple requests share a large common prefix (such as a fixed system prompt or knowledge base documents), platforms that support context caching offer steep discounts on cache-hit input tokens—commonly charging 10–20% of the standard input price for the hit portion.
There are two implementation variants to be aware of:
- Explicit caching: You actively write content to the cache, and there may be a “cache write fee”—the written portion is billed slightly above the normal input price, with subsequent hits enjoying the discount.
- Implicit caching: The platform automatically detects repeated prefixes; hits are discounted with no write fee.
When reconciling bills, you must clearly distinguish three token categories—“cache write,” “cache hit,” and “regular input”—otherwise your estimates will be significantly off.
3. Hands-On Calculation: A Real Bill Compared Side by Side
Assume a typical call with the following usage:
- Regular input: 509.8K tokens
- Output: 8.125K tokens
- Cache write: 467.3K tokens
Scenario A: Tiered-pricing model
An input of 509.8K falls into the 128K+ tier, at ¥7/M input and ¥28/M output:
- Input cost: 509.8K × ¥7/M ≈ ¥3.57
- Output cost: 8.125K × ¥28/M ≈ ¥0.23
- No separate cache-write fee; it’s folded into input billing
- Total ≈ ¥3.80
Scenario B: Flat-rate model with caching discount
Assume input at roughly ¥2/M, cache hits at roughly ¥0.5/M, and output at roughly ¥8/M (based on typical published pricing). If the 467.3K prefix is written once and fully hit on subsequent requests, the per-call cost is:
- Cache hits: 467.3K × ¥0.5/M ≈ ¥0.23
- Regular input: 42.5K × ¥2/M ≈ ¥0.09
- Output: 8.125K × ¥8/M ≈ ¥0.07
- Per-call total ≈ ¥0.39
Conclusion: For the same “long prefix + short output” workload, a flat-rate model with caching discounts can cost about one-tenth of a tiered-pricing model in steady-state operation. But if cache hit rates are low and every request carries a brand-new long input, the conclusion may reverse.
This shows that talking about “which is cheapest” without reference to your own usage distribution is meaningless.
4. Five Practical Cost Optimization Tips
- Profile your usage first: Measure input length distribution, output length distribution, and prefix repetition rate, then plug these into each provider’s price table to compute weighted costs.
- Maximize cache hits: Place stable content—system prompts, knowledge base material—at the very front of the request, and avoid inserting volatile content like timestamps into the prefix.
- Trim unnecessary context: Regularly prune conversation history, and summarize long documents or use retrieval-augmented approaches instead of passing everything in full each time.
- Route tasks by complexity: Send simple tasks to smaller models and reserve flagship models for complex reasoning, using a routing layer for automatic dispatch.
- Use billing details and exports: Some consoles present details poorly; export raw bills regularly and analyze them with scripts to monitor abnormal fluctuations in per-token cost.
5. Conclusion
There is no universally “best” LLM pricing model—only the one that best fits your usage structure. Flat-rate pricing wins on predictability, tiered pricing is competitive for short-input scenarios, and caching discounts are a powerful cost lever for high-frequency, long-prefix workloads. Teams should establish a closed loop of “usage monitoring → cost estimation → regular review,” letting data drive model selection rather than making decisions based on headline starting prices.
