LLM Plan Quotas and Costs: Why Token Consumption Matters More Than Unit Price
Choosing an LLM plan requires more than comparing per-token prices. This guide explains token billing, the main drivers of actual consumption, cost-estimation formulas, a Python example, engineering optimizations, plan selection steps, and long-term usage monitoring.
1. Why Comparing Unit Price Alone Can Mislead
When choosing a large language model (LLM) service, many people compare unit prices first and then decide which plan to buy. That comparison is useful, but incomplete. A unit price only tells you the price of one billing unit. The final cost depends on how many units each request actually consumes.
Suppose two options differ by a factor of two in unit price, but one of them consumes three times as many tokens per request on average. In that case, the total cost can be higher despite the lower unit price. To judge whether a plan is cost-effective, you need to consider three things together: unit price, average consumption per request, and total monthly request volume.
For individual users, these three factors are also affected by plan quotas. A plan usually sets an upper limit on usage within a period. After exceeding that limit, the service may throttle, queue requests, or switch to pay-as-you-go billing. The specific quota values and calculation rules are set by the provider and may change at any time. Before purchasing, refer to the latest official documentation.
2. What Tokens Are and Why Billing Uses Them
A token is the basic unit of text processed by a model. The model does not read content directly by word or character. It first uses a tokenizer to split text into tokens, then performs computation. English words usually correspond to one to several tokens, while a Chinese character usually corresponds to one or two tokens, depending on the tokenizer and the text.
Billing usually distinguishes between two types of tokens. Input tokens refer to all content sent to the model, including the user question, system prompt, conversation history, attachment text, and tool results. Output tokens refer to the answer generated by the model. The two types often have different unit prices, and output is usually more expensive because generation happens token by token.
Before reading a price table, confirm the following: whether input and output are priced separately; whether there is a discounted price for cache hits; whether reasoning content counts as output; and whether very long context has a separate rate. These rules differ across providers, and the same business volume can lead to very different costs.
3. Five Variables That Affect Actual Consumption
3.1 Input Length
Input length is often the largest variable. System prompts, role settings, format constraints, and examples are sent again with every request. If the system prompt is thousands of tokens long, you pay for that content even when the user asks a simple question.
3.2 Repeated Calculation in Multi-Turn Conversations
Models generally do not remember history. Each turn requires resending the previous conversation. The input for turn n is roughly all content from the previous n-1 turns plus the current question.
For example, assume each turn adds about 500 input tokens. Over 10 consecutive turns, the cumulative input is:
500 + 1000 + 1500 + … + 5000 = 27,500 tokens
If you look only at newly added content, the total is 5,000 tokens. The actual processed volume is about 5.5 times that amount. The longer the conversation, the more pronounced this amplification becomes. Consumption that grows roughly linearly per turn becomes an approximately quadratic cumulative total.
3.3 Output Length
Output length directly determines output token consumption. Many responses are far longer than necessary. For example, a request for a classification result may return a full explanation. You can significantly reduce this cost by specifying the output format, limiting maximum output length, and requiring only structured fields.
3.4 Tool Calls and Retrieved Content
When a model needs to call tools or read retrieval results, the tool output enters the context again as input. If a document retrieval returns ten passages of five hundred words each, the input for a single request can increase by thousands of tokens. The number of retrieved items and passage length need to be carefully controlled for each task.
3.5 Extra Overhead from Reasoning Mode
Some models support a deep reasoning mode that generates more intermediate content before giving the final answer. This content may count toward output consumption. Enabling deep reasoning for simple tasks can noticeably increase cost while providing limited quality improvement.
4. Convert Quotas into Actionable Estimates
To judge whether a plan has enough quota, you can use the following three formulas.
Cost per request:
Cost per request = fresh input tokens × input price + cached input tokens × cached price + output tokens × output price
Daily consumption:
Daily consumption = daily requests × average tokens per request
Monthly budget headroom:
Headroom ratio = (available plan quota − projected monthly consumption) ÷ available plan quota
The average token count per request should be obtained from actual logs rather than estimated from experience. It is best to sample at least one week of real requests and separate weekdays from peak periods, because both request volume and average conversation length are usually higher during peak periods.
A budget headroom of around 30% is recommended. Business growth, prompt iteration, and fluctuations in user input can all increase consumption. Leaving headroom helps avoid sudden overages at the end of the month.
5. Example: Estimating Per-Request and Monthly Costs in Code
The following example shows how to estimate costs from log records. The unit prices here are placeholders and should be replaced with the latest prices published by the provider.
from dataclasses import dataclass@dataclassclass UsageRecord:input_tokens: int # Total input tokens for this requestcached_input_tokens: int # Portion that hit the cacheoutput_tokens: int # Output tokens generated by the model@dataclassclass PriceTable:input_per_m: float # Price per million input tokens (placeholder)cached_per_m: float # Price per million cached input tokens (placeholder)output_per_m: float # Price per million output tokens (placeholder)def request_cost(rec: UsageRecord, price: PriceTable) -> float:fresh_input = rec.input_tokens - rec.cached_input_tokensreturn (fresh_input * price.input_per_m+ rec.cached_input_tokens * price.cached_per_m+ rec.output_tokens * price.output_per_m) / 1_000_000def monthly_estimate(records: list[UsageRecord], price: PriceTable,sample_days: int, days_in_month: int = 30) -> float:total = sum(request_cost(r, price) for r in records)daily = total / sample_daysreturn daily * days_in_monthif __name__ == "__main__":price = PriceTable(input_per_m=10.0, cached_per_m=1.0, output_per_m=30.0)sample = [UsageRecord(input_tokens=6000, cached_input_tokens=4000, output_tokens=800),UsageRecord(input_tokens=12000, cached_input_tokens=9000, output_tokens=1500),]print(f"Average cost per request in sample: {sum(request_cost(r, price) for r in sample) / len(sample):.4f}")print(f"Monthly cost extrapolated from a 7-day sample: {monthly_estimate(sample, price, sample_days=7):.2f}")
This code serves two purposes. First, it calculates cache hits separately from fresh input, avoiding overestimation based on full input volume. Second, it extrapolates sampled data by day to a monthly estimate, making results from different sampling periods comparable.
6. Engineering Methods for Reducing Actual Consumption
After estimating costs, you can reduce consumption at the engineering level. Common approaches include:
- Streamline system prompts. Remove duplicate rules and replace long explanations with short structured constraints.
- Control history length. After a certain number of turns, summarize earlier conversation and keep only the key information relevant to the current question.
- Reuse cache. Put stable, unchanged prefix content at the beginning of requests so it is more likely to hit the cache.
- Limit output. Use clear format requirements and maximum output length to avoid unnecessary long explanations.
- Select models by task tier. Use lighter models for simple tasks such as classification, extraction, and format conversion, and call high-end models for complex reasoning tasks.
- Control retrieval scale. Return only highly relevant passages and limit the length of each passage.
The effect of these methods should be verified with logs. After each change, compare average input, output, and per-request cost before and after the change, and confirm that quality has not declined.
7. A Complete Selection Workflow
When choosing a plan or billing method, consider the following steps:
- Define the business scenarios and list the main features and their call frequencies.
- During testing or a small-scale launch, record token data from real requests for at least one week.
- Calculate cost per request by feature and identify the most consumption-heavy components.
- Optimize high-consumption components and resample to verify the results.
- Use the optimized data to compare the monthly cost of the plan option and pay-as-you-go billing.
- Reserve about 30% headroom and set usage alerts to avoid overages that affect service.
Pay-as-you-go billing is suitable for scenarios with large, hard-to-predict usage fluctuations. Fixed plans are suitable for scenarios with stable, predictable, and relatively large usage. The break-even point between the two should be calculated from actual data, not judged only by unit price.
8. Establish Long-Term Monitoring
Usage control is ongoing work. For each call, record the following fields: request time, feature module, input tokens, cache-hit tokens, output tokens, latency, and return status. After aggregating this data into logs or a monitoring system, you can set alerts such as:
- Notify when daily consumption exceeds a certain percentage of the budget.
- Record samples when input tokens for a single request exceed a threshold, making it easier to investigate abnormal long contexts.
- Check whether prompts have been modified or abnormal outputs have appeared when the average output length of a feature rises noticeably.
Once these metrics are stable, the team can use real data to decide whether a plan needs adjustment rather than relying on experience or a single unit-price comparison.
