LLM API Cost Analysis: How Cache Hit Rates and Subscription Plans Affect Real Spending
LLM API costs depend on more than advertised token prices. This article examines how cache hit rates, input-to-output token ratios, peak-hour pricing, and subscription quotas affect actual spending, and outlines a practical framework for comparing providers against real workload patterns.
When teams choose an LLM API, cost is often one of their most important selection criteria. Yet comparing headline prices alone can be misleading. Billing details—including cached input rates, output token usage, and the relationship between subscriptions and pay-as-you-go pricing—often determine what a team actually spends.
A useful cost assessment therefore needs to go beyond a price list. It should connect each provider’s billing structure to the characteristics of the workload.
1. Unit Prices Are Only Part of the Comparison
An initial comparison often focuses on the price per million tokens. However, a single low rate does not necessarily translate into a lower bill.
Consider the prices cited for two unnamed models: a recently released lightweight model charges CNY 0.115 per million cached input tokens, while a cost-focused model from another cloud provider charges CNY 0.05. On that metric alone, the second model appears substantially cheaper.
An actual API bill, however, typically includes three components:
- Cached input tokens
- Uncached input tokens
- Output tokens
The relative share of each component varies by application. Consequently, the weighted cost can differ significantly from what the cached-input price suggests.
The prices and plans discussed below are examples from the source comparison, not a current pricing guide or a statement of international availability. All monetary amounts are in Chinese yuan (CNY).
2. Cache Hit Rate Can Reverse the Cost Advantage
Cache hit rate is one of the most important variables in LLM API cost analysis. When requests reuse an eligible system prompt or context, prompt caching can reduce the cost of processing that repeated input. This should not be confused with returning a previously cached answer.
The source comparison illustrates how sensitive total costs can be to caching:
| Assumed cache hit rate | Model A: cost per 100 million tokens | Model B: cost per 100 million tokens |
|---|---|---|
| 98% | CNY 12.57 | CNY 9.40 |
| 95% | CNY 14.92 | CNY 18.25 |
At a 98% hit rate, Model B costs approximately 25% less. When the hit rate falls to 95%, Model A becomes cheaper.
The explanation lies in the uncached-input rate. A model with very inexpensive cached input may charge substantially more for cache misses. Even a small decline in cache utilization can then increase the total bill sharply.
The original calculation also cites input and output shares of 1.5% and 0.5%, respectively, but does not fully define their relationship to the cached-token share. The figures above should therefore be treated as illustrative results under the stated assumptions, rather than as an independently reproducible pricing calculation.
The central takeaway remains clear: a change in cache hit rate can reverse the apparent price advantage between two models.
Applications with reusable prompts or context—such as customer support assistants, document summarization workflows, and ongoing conversations—should pay particular attention to caching economics. For workloads with highly dynamic context, a model that looks cheaper on its cached-input rate may produce a higher overall bill.
3. Peak and Off-Peak Pricing Change the Calculation
Time-of-use pricing adds another dimension to API cost comparisons.
In one subscription plan described in the source, a provider defines peak hours as Monday through Friday, from 14:00 to 18
a four-hour window each weekday. Another provider uses a substantially longer peak window. Any practical comparison must interpret these schedules in the provider’s applicable time zone.
This difference matters when requests can be scheduled. Large offline processing jobs that run at night or on weekends may benefit from off-peak pricing. A shorter peak window can create more opportunities to run those workloads at lower rates.
For interactive applications, the outcome depends on when users are active. If traffic is concentrated within the peak window, a large share of requests may still incur higher charges, even when that window is relatively short.
The right question is therefore not simply how long peak hours last, but how much of your traffic falls within them.
4. When Do Subscription Plans Offer Better Value?
Some cloud providers offer monthly subscriptions alongside pay-as-you-go billing. These plans trade a fixed commitment for discounted usage, subject to quota and scheduling rules.
One coding-oriented subscription described in the source has three tiers:
| Plan | Monthly fee | Reported weekly off-peak token allowance at a 98% cache hit rate | Estimated monthly pay-as-you-go equivalent |
|---|---|---|---|
| Lite | CNY 118 | 317 million tokens | Approximately CNY 160 |
| Pro | CNY 538 | 1.900 billion tokens | Approximately CNY 955 |
| Max | CNY 1,078 | 4.433 billion tokens | Approximately CNY 2,229 |
Under these assumptions, subscription fees are roughly 50%–70% of the estimated pay-as-you-go equivalents. For teams with steady usage that can take advantage of off-peak capacity, a subscription can offer meaningful savings.
Those savings are conditional, however. The allowances shown depend on the stated 98% cache hit rate and off-peak usage assumptions; they should not be read as unconditional token entitlements.
Another important detail is that the quotas are weekly, while the fees are monthly. A monthly usage estimate can conceal a significant weekly spike. If one week exceeds its allowance, additional usage may require pay-as-you-go billing, reducing the effective subscription discount.
Subscription value therefore depends not only on total consumption, but also on how evenly that consumption is distributed.
5. Build a Workload-Based Cost Model
A practical evaluation should bring the relevant billing dimensions into one model rather than compare them in isolation.
1. Measure the Actual Token Mix
Use historical requests to establish the proportions of input and output tokens.
Conversational applications may generate relatively long responses, while document classification tasks may return only a short label. These differences directly affect the bill because input and output rates can differ substantially.
Distinguish cached input from uncached input as well. Treating all input tokens as one category can hide the largest source of pricing sensitivity.
2. Estimate a Realistic Cache Hit Rate
Assess how much of the system prompt and conversation context can be reused across requests.
Instead of relying on an ideal hit rate, calculate costs at both a conservative and an optimistic level. This helps reveal whether a provider remains economical when caching performs less well than expected.
3. Map Traffic to Pricing Windows
Analyze when requests occur and assign them to peak or off-peak periods.
For workloads that must respond around the clock, the length and timing of peak windows can materially affect total spending. For batch workloads, evaluate the proportion of processing that can realistically run outside those windows.
4. Include Every Applicable Billing Component
Combine the following in a single calculation:
- Cached-input token prices
- Uncached-input token prices
- Output token prices
- Peak and off-peak rates
- Subscription fees
- Weekly allowances and any applicable overage charges
For pay-as-you-go usage, the basic structure is the sum of cached-input, uncached-input, and output charges, calculated separately for each applicable pricing window. Subscription comparisons must additionally account for whether actual usage fits within the plan’s quota structure.
The result should be a weighted estimate based on workload behavior, not a comparison of isolated advertised rates.
5. Account for Indirect Costs
Token charges are only part of the total cost of ownership. Also consider:
- Concurrency limits
- Inference speed
- Context window length
- The amount of iterative testing and experimentation required
These factors may not appear as separate line items on the API bill, but they can affect development effort, application performance, and overall operating cost.
6. Conclusion
There is no universally cheapest LLM API—only a better fit for a particular workload.
Cache hit rates, peak-hour schedules, and subscription quota structures jointly determine the real economics of a model service. A low cached-input price may lose its advantage when cache misses increase. A discounted subscription may deliver less value when usage is uneven or concentrated during peak hours.
For teams investing in AI over the long term, the most reliable approach is to build a cost model around actual token composition, traffic timing, and usage patterns. Updating that model as the workload changes provides a stronger basis for purchasing decisions than any single headline price.
