Cost Estimation and Model Selection When LLM API Prices Rise
This article explains how to evaluate cost and choose between large language model APIs after a major price increase. It breaks down the typical pricing structure into input tokens, output tokens, and cache hits, provides a concrete calculation example for an AI coding assistant, and offers practical advice for developers and teams to keep costs under control without sacrificing output quality.
Recent releases of flagship large language model APIs have seen significant price hikes—for example, one new generation product charges around ¥100 per million output tokens, ¥20 per million input tokens, and roughly ¥1 per million cached tokens, several times higher than the previous generation. This trend of “higher capability, higher price” is becoming common across the industry. Without targeting any specific vendor, this article uses such scenarios to discuss how individual developers and enterprise teams can calculate costs, compare integration options, and make rational model selection decisions after a major price adjustment.
Why Flagship Models Are Getting More Expensive
1. Model Scale Directly Raises Inference Costs
Current flagship models commonly adopt the Mixture-of-Experts (MoE) architecture. The total number of parameters can reach trillions, but only a portion—often tens of billions—is activated per inference call. Even so, memory capacity, inter-chip interconnect bandwidth, and scheduling complexity remain significantly higher than in smaller models. As context windows expand to hundreds of thousands or even millions of tokens, attention computation and KV cache memory usage grow considerably with sequence length. A single inference card can handle fewer concurrent requests, driving up the hardware cost per token.
Output token pricing is usually about five times that of input tokens. The reason lies in the fundamentally different computation patterns. Output tokens are generated autoregressively—one token at a time—and each token requires a full forward pass. Input tokens, by contrast, can be processed in parallel. The compute cost is inherently asymmetric. Understanding this asymmetry is the starting point for judging whether any LLM pricing is reasonable.
2. Price Adjustments May Reflect Product Repositioning
Beyond raw cost, providers also adjust pricing strategy. Some services have shifted from low-cost, broad accessibility aimed at trial users to high-value scenarios such as professional programming and knowledge work. As the target audience’s willingness to pay changes, the price anchor moves upward. For users, the core question is: in your specific use case, how much effective output can you get per unit of money spent?
Understanding the Billing Structure: Input, Output, and Cache Hits
A three-tier price structure splits the cost of a single request into three parts:
- Input tokens: The cost of encoding the prompt, conversation history, and document content into the model.
- Output tokens: The cost of generating the model’s response—usually the most expensive component in a single request.
- Cached tokens: When the request prefix matches a previous request, the server can reuse the already computed KV cache, avoiding redundant computation. This is why cached token prices can be as low as one-twentieth of regular input prices.
The low price of cached tokens highlights an important point: placing reusable system prompts, project context, and long documents at the beginning of a request, and keeping the prefix stable, is a legitimate and effective cost-reduction measure. Some providers charge separately for cache writes, and there may be minimum prefix length requirements. These rules are documented in the official documentation of each provider and should be verified before making a selection.
Cost Calculation Example
Let’s walk through a calculation for an AI coding assistant scenario. Assumptions:
- Each request carries an average of 50,000 tokens of context, of which 80% hit the cache—that is, 40,000 cache-hit tokens and 10,000 uncached input tokens.
- Each request generates an average of 2,000 output tokens.
- 500 requests per day, 30 days per month.
- Pricing: uncached input at ¥20 per million tokens, cached tokens at ¥1 per million tokens, output at ¥100 per million tokens.
- This calculation excludes cache write fees and any additional tiered pricing adjustments.
Step-by-step monthly cost:
- Uncached input tokens: 500 requests/day × 10,000 tokens/request = 5,000,000 tokens/month. Cost = 5,000,000 / 1,000,000 × ¥20 = ¥100.
- Cached input tokens: 500 requests/day × 40,000 tokens/request = 20,000,000 tokens/month. Cost = 20,000,000 / 1,000,000 × ¥1 = ¥20.
- Output tokens: 500 requests/day × 2,000 tokens/request = 1,000,000 tokens/month. Cost = 1,000,000 / 1,000,000 × ¥100 = ¥100.
Total monthly cost = ¥100 + ¥20 + ¥100 = ¥220.
This example shows that even with a relatively high output price, the effective cost per valid request can be kept reasonable if the cache hit rate is high and the output length is controlled. The same methodology applies to other scenarios—simply plug in your own request volume, average context size, cache hit rate, output length, and the provider’s pricing table.
Practical Considerations for Model Selection
When a provider raises prices, the first reaction is often to switch to a cheaper alternative. But a rational decision requires comparing total cost of ownership across providers and integration modes. Key factors include:
- Actual cache hit rate: Measure your real traffic patterns. If a large portion of your prompts are stable, the effective cost per request may be far lower than the headline price suggests.
- Output token efficiency: Some models produce more concise, directly usable responses, reducing the number of output tokens needed for the same task. A higher-priced model with fewer tokens can be cheaper than a lower-priced, more verbose model.
- Input context requirements: If your use case involves very long documents, the cost of uncached input becomes more important. Models with larger context windows may let you avoid complex chunking logic, but they also increase the baseline cost.
- Integration cost: Changing models may require rewriting prompts, adjusting post-processing logic, or updating evaluation pipelines. These engineering costs should be factored into the comparison.
A practical approach is to build a simple spreadsheet that estimates monthly cost for each candidate model under your real workload. Include input, output, and cache components, plus a range of cache hit rates (optimistic, base, pessimistic). Then evaluate the output quality on a representative set of tasks, ideally using both automated metrics and human review.
Conclusion
Price increases for flagship LLM APIs are likely to continue as models grow larger and capabilities expand. Instead of reacting emotionally, developers and teams should master the billing structure, take advantage of cache hits by stable prompt prefixes, and run their own cost model with realistic assumptions. By combining a clear cost calculation framework with a quality-oriented evaluation process, you can make a sound selection that balances capability, reliability, and budget—even in a rising price environment.
