Pricing Quotas for LLM Inference Services: Trade-offs Between Cost, Throughput, and Latency

    This article explains how to set quota tiers for LLM inference services while balancing cost, throughput, and latency. It covers the two stages of inference cost, a formula for estimating cost per million tokens, how time to first token and throughput affect multi-step tasks, the trade-offs between self-hosting and upstream forwarding, failover routing, and a framework for model selection and quota design.

    1. Where the Problem Starts: A Higher Quota Does Not Mean Higher Usage

    In intelligent coding tools and other AI applications, providers often offer quota tiers based on user level. For the same model, quotas can range from very low to very high, yet actual usage does not necessarily grow in proportion. Users’ consumption depends on price, response speed, output quality, and stability at the same time. A quota is only a ceiling. Users tend to use up their quota only when price, speed, and experience are all acceptable.

    This shows that quota adjustments cannot be judged by the number alone. The appeal of a tier depends on three conditions: the unit price is acceptable, response speed meets the needs of interactive use, and model capability fits the task. If any one of these is missing, a higher quota will not drive real usage.

    For providers, the quota is also a cost control tool. A higher quota means a higher maximum potential cost. If the unit selling price is below the unit cost, a larger quota means a larger maximum loss. Understanding the cost structure behind a quota is therefore a prerequisite for evaluating any tiering strategy.

    2. What Makes Up Inference Cost

    The cost of LLM inference mainly comes from compute resources and GPU memory usage. A request typically goes through two stages.

    The first stage is prefill. The model processes all input tokens at once. This stage requires heavy computation and is usually limited by compute capacity. Longer inputs make this stage take longer, and time to first token (TTFT) rises accordingly.

    The second stage is decode. The model generates output tokens one at a time. Each token requires reading a large number of model parameters and the cached key-value (KV) history. This stage is usually limited by memory bandwidth. Longer outputs mean a longer total processing time.

    Beyond these two stages, several other factors affect cost:

    1. Batching: Combining multiple requests into one computation improves hardware utilization and lowers the amortized cost per token.
    2. Concurrency and queuing: When there are too many requests, queuing time increases, and TTFT gets worse.
    3. Cache hits: If inputs with the same prefix can reuse the KV cache, repeated computation is reduced.
    4. Cold starts and idle resources: Instances still incur fixed costs when idle, and low utilization during off-peak hours lowers overall efficiency.
    5. Quantization and inference engine optimization: Suitable quantization precision, operator fusion, and scheduling strategies can raise throughput on the same hardware.

    As a result, the same model can cost very different amounts across providers. These differences often come from deployment methods and engineering optimization, not only from the model itself.

    3. Estimating the Unit Cost per Token

    Before deciding whether a tier is profitable, a provider needs to calculate the unit cost per token. A common estimation formula is:

    Unit cost = hourly hardware cost ÷ (average throughput × 3600 × average utilization)

    Average throughput is the total number of tokens generated per second. It depends on batch size and inference engine efficiency. Average utilization is the share of time that resources spend processing requests. It reflects traffic fluctuations and scheduling quality.

    The example below uses hypothetical parameters to demonstrate the calculation. The numbers do not represent data from any real service.

    1. def cost_per_million_tokens(hourly_cost, throughput_tps, utilization):
    2. """Estimate the cost per million tokens from hourly cost, average throughput, and utilization."""
    3. tokens_per_hour = throughput_tps * 3600 * utilization
    4. return hourly_cost / tokens_per_hour * 1_000_000
    5. # Assumptions: hardware cost of 100 CNY per hour, aggregate throughput of 2000 token/s, utilization of 60%
    6. print(round(cost_per_million_tokens(100, 2000, 0.6), 2)) # Output: 23.15

    This result shows that a 10-point drop in utilization, from 60% to 50%, raises the unit cost by about 20%. For services with large traffic fluctuations, idle capacity during off-peak hours can noticeably raise the unit price. Improving utilization is therefore usually more effective than simply cutting hardware prices.

    Once the unit cost is calculated, a provider can use it as the floor for pricing. If the selling price falls below this floor, every token processed loses money.

    4. How Throughput and Time to First Token Affect User Experience

    Two metrics are commonly used to evaluate an inference service: throughput, measured as tokens generated per second (usually called TPS), and time to first token (TTFT), which is the time from sending a request to receiving the first token.

    For conversational scenarios, TTFT determines whether users feel the model responds immediately. For long-form generation, throughput determines how long users wait for the full result. The two metrics affect the experience in different ways, so each should be monitored separately.

    In intelligent coding and automated agent scenarios, a single task often involves several model calls, and latency accumulates across them. The total time for one call can be approximated as:

    Time per call ≈ TTFT + output tokens ÷ throughput

    Suppose a task calls the model ten times, each call has a TTFT of 5 seconds and produces 800 output tokens, and throughput is 100 token/s. Each call then takes about 13 seconds, and ten calls take about 130 seconds in total. If throughput drops to 50 token/s, the same task takes about 210 seconds. Small changes in throughput are amplified in multi-step tasks, and users will notice the slowdown.

    For this reason, price should not be the only factor in model selection. Teams should also measure end-to-end latency using real tasks.

    5. Trade-offs Between Self-Hosting and Upstream Forwarding

    Providers have two main ways to get model capability.

    The first is self-hosting. The model runs on owned or rented compute resources, and the provider chooses the inference engine and scheduling strategy. The advantages are a controllable cost structure, the ability to tune performance for specific models, and independent decisions on scaling and version upgrades. The cost is the work of operations, capacity planning, and incident handling. Stability depends on the team’s engineering capability.

    The second is upstream forwarding. Requests are sent to the model provider’s API. The advantage is simple integration, with no need to maintain inference infrastructure. The risk is that pricing and discounts are set by the upstream provider. When terms change, costs change too, and the provider has difficulty keeping prices stable over the long term.

    In practice, the two approaches are often combined. For example, a core model can be self-hosted to control costs, while a backup model is accessed through forwarding to ensure availability. Whichever approach is used, the cost model should account for discount changes, capacity limits, and the risk of service interruptions. One-time promotions should not be treated as a long-term baseline.

    6. Design Logic for Quota Tiers

    A well-designed tiered quota should serve three goals: controlling maximum risk, guiding real demand, and maintaining unit economics.

    First, quota ceilings should be linked to the break-even price. Before setting a quota for a tier, estimate the cost of that tier under typical usage patterns, and confirm that the unit revenue is not lower than the unit cost. If a tier has a high quota but low actual usage, the cause is usually the price or the experience, not a lack of demand.

    Second, observing the usage distribution is more useful than observing total volume. Average usage can hide polarization. A small number of heavy users may consume most of the resources, while most users use very little. The purpose of tiering is to place users with different usage intensities in suitable price ranges.

    Third, quota changes should be followed by an observation period. Short-term promotions or discounts can attract concentrated usage, but this data does not directly represent long-term demand. After an adjustment, observe at least one full business cycle before deciding whether to keep it.

    Fourth, pricing changes should be announced in advance, and a fallback plan should be kept. When upstream terms or cost structures change, providers need a clear adjustment process to avoid sudden disruptions for users.

    7. Availability: Multi-Model Routing and Failover

    If a single model service fails, users’ work is interrupted directly. For this reason, mature systems often use multi-model routing, which includes the following components:

    1. Health checks: Periodically probe the availability and latency of each model endpoint to detect problems early.
    2. Timeout control: Set thresholds for TTFT and total processing time. A request that exceeds the threshold is treated as failed.
    3. Circuit breaking: After an endpoint fails consecutively to a set threshold, pause forwarding to it temporarily to prevent the failure from spreading.
    4. Degradation and switching: Switch to a backup model with similar capability, and record the reason for each switch.

    Example logic:

    1. def call_with_fallback(prompt, models, timeout_s=15):
    2. """Call models in priority order. Return the first successful result, or raise an exception if all models fail."""
    3. last_error = None
    4. for model in models:
    5. try:
    6. return model.generate(prompt, timeout=timeout_s)
    7. except (TimeoutError, ConnectionError) as err:
    8. last_error = err # Record the error and try the next model
    9. raise RuntimeError("All models are unavailable") from last_error

    Switching models may change output style and tool-calling behavior. For workflows that depend on a fixed output format, validate the format before switching. If needed, add an adaptation layer.

    8. Capability Differences and Model Selection

    Models differ in multimodal input, context length, reasoning ability, tool calling, and code generation. When selecting a model, design an evaluation set around the specific tasks instead of relying only on general rankings.

    The table below lists common evaluation dimensions that can serve as a reference framework for internal testing.

    Dimension Focus Evaluation Method
    Task quality Whether the output is correct and complete Score real task samples manually or automatically
    Latency TTFT and end-to-end processing time Record percentiles and watch the tail latency of requests
    Cost Unit cost per token and break-even price Calculate with the formula above and review regularly
    Stability Error rate, timeout rate, and switching frequency Monitor continuously and set alert thresholds
    Feature coverage Multimodal input, long context, and tool calling Verify each item against business requirements

    Model selection conclusions should be updated over time. Model versions change quickly, so an advantage from a previous generation may be overtaken by a newer version, and pricing and speed also change. Running evaluations as a recurring process is more reliable than making a one-time decision.

    9. Practical Recommendations

    Based on the analysis above, teams building or operating inference services can consider the following practices.

    1. Build a unit cost dashboard that tracks cost, revenue, and utilization for each model and tier.
    2. Monitor throughput, TTFT, error rate, and switching count together. Do not rely only on averages. Pay attention to percentiles.
    3. Select models by task complexity. Use lower-cost models for simple tasks and call higher-capability models for complex tasks.
    4. Use the break-even price as the pricing floor, and set quota ceilings based on actual usage distribution.
    5. Prepare plans for upstream discount and term changes, so the service does not depend on a single promotion.
    6. After each quota or model change, observe a full cycle before deciding whether to keep it.

    Competition among inference services ultimately comes down to balancing cost, speed, quality, and stability. Quantifying each dimension and continuously calibrating with real data makes quota design sustainable and useful to the people who use the service.