LLM API Cost Comparison: How Cache Hit Rates and Subscription Plans Really Affect Your Bill
Comparing per-million-token prices alone can be misleading when choosing a large language model API. This article builds a reusable cost evaluation framework that factors in cache hit rates, input/output token ratios, and subscription plan peak-hour policies. Through worked examples, it shows how a product with cheaper cached input can actually cost more overall once real-world conditions change, and offers scenario-based guidance for matching billing models to different workload types.
LLM API Cost Comparison: How Cache Hit Rates and Subscription Plans Really Affect Your Bill
Pricing models for large language model APIs have become increasingly complex. Simply comparing the “price per million tokens” no longer reflects real-world spending. Recently, developers have debated the cached-input pricing of two mainstream LLM products: one charges as little as 0.115 yuan per million cached input tokens, while the other drops to 0.05 yuan per million during off-peak hours — a gap of more than 2x on the surface. However, once you factor in cache hit rates, input/output token ratios, and peak-hour policies attached to subscription plans, the conclusion can flip dramatically. This article takes no side with any specific vendor. Using publicly available, generic billing logic, it builds a reusable cost evaluation framework to help businesses make more rational decisions when selecting an API.
1. Common Pricing Misconceptions: Why Single-Point Comparisons Mislead
Many developers evaluate LLM API costs by directly comparing “input price” or “cached price.” This approach ignores three key dimensions:
First, structural differences in token traffic. In real applications, the ratio of input tokens to output tokens is rarely 1:1. In typical scenarios such as code completion, document Q&A, and content moderation, input tokens often outnumber output tokens by several times. If a product is cheap on the input side but expensive on the output side, its overall cost may actually be uncompetitive. Any cost comparison should therefore be based on your actual input-to-output traffic ratio, not a single price point.
Second, the weight of cache hit rate. A cache hit means you don’t pay full price for repeated input content — only a very low cached-read fee. In high-hit-rate scenarios, the cached price essentially determines total cost; in low-hit-rate scenarios, the uncached input price and output price dominate. Cache hit rate is not fixed — it depends on business type, how templated your prompts are, and how much content is shared across users.
Third, the boundary between subscription plans and pay-as-you-go. Subscription plans typically come with peak/off-peak differentiated policies, request caps, or token quota limits. For workloads with sharp traffic spikes, peak-hour pricing can far exceed off-peak rates, and the real value of a plan’s discount must be evaluated against your own usage curve.
2. Building a Cost Model: From Single Prices to Total Cost
To compare products objectively, we use the following model:
Cost per request = Input tokens × (cache hit rate × cached input price + (1 - cache hit rate) × uncached input price) + Output tokens × output price
Assume a total workload of 100 million tokens, with input tokens making up the majority (say 85%) and output tokens 15%. We calculate the total cost for two products at different cache hit rates.
Scenario 1: High cache hit rate (98%)
- Product A (slightly higher cached price): cached input at 0.115 yuan/million tokens, uncached input assumed at 1.2 yuan/million tokens, output at 0.9 yuan/million tokens.
- Product B (cheap off-peak cached price): cached input at 0.05 yuan/million tokens, but uncached input and output prices are relatively higher, at 1.5 and 1.2 yuan/million tokens respectively.
With 85 million input tokens and 15 million output tokens:
- Product A: 85M × (98% × 0.115 + 2% × 1.2) / 100 + 15M × 0.9 / 100 = 11.95 + 13.5 = 25.45 yuan
- Product B: 85M × (98% × 0.05 + 2% × 1.5) / 100 + 15M × 1.2 / 100 = 6.71 + 18 = 24.71 yuan
In this scenario, Product B still wins slightly thanks to its cached-price advantage — but the gap has shrunk from an apparent 2x to roughly 3%.
Scenario 2: Moderate cache hit rate (95%)
- Product A: 85M × (95% × 0.115 + 5% × 1.2) / 100 + 15M × 0.9 / 100 = 14.39 + 13.5 = 27.89 yuan
- Product B: 85M × (95% × 0.05 + 5% × 1.5) / 100 + 15M × 1.2 / 100 = 10.41 + 18 = 28.41 yuan
Once the cache hit rate drops to 95%, Product B’s total cost exceeds Product A’s, because the gap in uncached input and output prices is amplified. In other words, a cheap cached price does not mean a low total cost — at moderate hit rates, the output price and uncached input price become decisive.
3. The Real Value of Subscription Plans: Discount Rates and Peak-Hour Constraints
Beyond pay-as-you-go, many vendors offer tiered subscription plans — typically Lite, Pro, and Max tiers with rising monthly fees and increasing token quotas and concurrency. These plans are usually priced against the “list-price API,” effectively at 50%–70% of list price. But that doesn’t mean every user gets the same discount. The key variable is the peak-hour window.
Some platforms define peak hours as 14:00–18:00 on weekdays — just 4 hours a day. Others may cover the entire daytime, or even include evening prime time. For teams whose traffic concentrates outside peak hours (for example, a SaaS application serving overseas users), how peak hours are defined directly affects a plan’s real throughput. Suppose a platform defines peak hours as 14:00–18:00 on weekdays: most routine daytime calls would fall into that window. If the plan only guarantees the quota outside this window, the actually usable quota may be far below the advertised figure.
Take a Pro-tier plan (538 yuan/month) as an example: officially, it can process 1.9 billion tokens per week off-peak. If 60% of your actual calls occur during peak hours, and peak-hour quota is only 50%–60% of the off-peak quota, your effective weekly token allowance shrinks substantially. The implied discount versus list-price API pricing could then rise from 60% to 80% or more — and the plan is no longer such a good deal.
4. Scenario-Based Recommendations: Match Billing Models to Your Workload
Based on the cost model and plan analysis above, here are reference recommendations for different types of workloads:
Type 1: High cache hit rate workloads (templated prompts, knowledge-base Q&A)
These typically achieve cache hit rates above 98%, with cost concentrated in cached reads and output tokens. Prioritize products with low cached-input prices and controllable output prices. Note that even with a cached-price advantage, an excessively high output price can still make total cost uncompetitive — always calculate based on your output-to-input ratio.
Type 2: Low hit rate workloads (multi-turn free-form chat, highly personalized inputs)
When the cache hit rate falls below 90%, uncached input and output prices determine nearly all of the cost. Cached-price differences become negligible; compare the weighted sum of “uncached input price + output price” directly. A product with an extremely low cached price but high uncached price can be a trap.
Type 3: Highly volatile workloads (traffic spikes from promotions or trending events)
Pay-as-you-go costs more per token but scales elastically without limits; subscription plans offer discounts but may lack peak-hour quota. A combined “plan as baseline + pay-as-you-go for overflow” approach works well: use the plan to cover baseline traffic and pay as you go for the excess. Also read the plan’s peak-hour window definition carefully to ensure sufficient peak quota.
5. Observability and Cost Governance: From Estimates to Precise Accounting
Whichever billing model you choose, you should build an observability system for LLM API costs. Specific practices:
- Structured logging: Record input tokens, output tokens, cache hit or miss, business line, model version, and other tags for every request, forming the foundational data for cost attribution.
- Cost monitoring and alerting: Set monthly cost budgets and per-request cost thresholds, and trigger alerts when actual costs deviate from expectations. Use general-purpose monitoring tools or self-built dashboards to visualize token consumption, cache hit rate, and average cost.
- Dynamic routing and fallback strategies: Route dynamically between multiple models or billing modes based on token cost and latency requirements, and configure fallback strategies (e.g., using a lightweight model for low-priority tasks) to keep overall costs under control.
6. Conclusion
Choosing an LLM API is not a simple “price comparison” — it is a systematic decision involving cache hit rate, token traffic ratios, peak-hour windows, plan quotas, and observability infrastructure. By building a comprehensive cost model, this article has shown how two mainstream products can reverse their cost ranking under different conditions: when the cache hit rate exceeds 97%, the product with the cheaper cached price wins; below 95%, the “cheaper” option may actually cost more overall. Developers should base their choice on their own real usage data and multi-scenario calculations — not on a vendor’s advertised “best price.”
Enterprise users should go further and establish long-term cost governance, treating token costs as part of overall technical debt management with regular reviews and tuning. Only then can AI investments continue to deliver quantifiable business returns as model capabilities keep evolving.
