How Free Quotas for Large Language Models Work: Web, App, and API Differences

    This article explains how to interpret “free quota” for large language models by distinguishing consumer-facing web and app access from developer APIs. It covers token-based billing, input versus output pricing, peak and off-peak rates, a code example for cost estimation, common misunderstandings, and practical steps for monitoring and controlling usage costs.

    1. First, Identify Which Access Point “Free” Refers To

    The same large language model capability is often delivered through multiple entry points. There are three common types:

    • Web chat interface: Intended for general users and accessed directly through a browser. These entry points usually have no explicit usage cap and do not distinguish membership tiers.
    • Client apps: Functionality is basically the same as the web version, installed on a phone or computer, and billed according to the same logic as the web version.
    • Developer API: Used for programmatic calls and charged by the actual consumption unit. APIs generally do not include free quota; some services may offer a small trial quota, subject to the provider’s published terms.

    Therefore, when discussing “how much free quota is available,” you must first specify the access point. Mixing a human-facing interaction interface with a programmatic API is the most common misunderstanding.

    2. Basic Principles of Token-Based Billing

    A token is the basic unit that a model uses to process text. When receiving input and generating output, the model splits text into tokens. A token is not equivalent to a character or a word. A Chinese character may correspond to one or more tokens, and an English word may be split into several segments. For text of the same length, token counts can differ significantly depending on the tokenization method.

    Billing is usually divided into two parts:

    • Input tokens: The prompt submitted by the user, attached context, and historical conversation content.
    • Output tokens: The answer generated by the model.

    Most pay-as-you-go services set different unit prices for input and output, and output is generally priced higher. Specific prices should be based on the provider’s published price list; this article does not provide specific numbers.

    3. Peak and Off-Peak Billing

    Some services adjust unit prices by time period. Unit prices may be higher during peak periods when users are concentrated and lower during off-peak periods. This design is similar to electricity billing, using price signals to guide resource usage.

    For developers, two points require attention:

    1. Batch tasks, such as offline document summarization, data cleaning, and batch labeling, can be scheduled during off-peak periods to reduce total cost.
    2. Real-time interactive applications cannot be shifted freely. The budget model needs to account for peak and off-peak differences and reserve a certain margin.

    4. Estimating Costs with Code

    The following example illustrates the estimation approach. The unit prices are fictional placeholder values and should be replaced with numbers from the price list in actual use.

    1. def estimate_cost(input_tokens, output_tokens,
    2. price_in_per_million, price_out_per_million,
    3. peak_factor=1.0):
    4. """Estimate the cost of a single or batch call based on per-million-token prices (in CNY)."""
    5. cost_in = input_tokens / 1_000_000 * price_in_per_million
    6. cost_out = output_tokens / 1_000_000 * price_out_per_million
    7. return (cost_in + cost_out) * peak_factor
    8. # Assume 1,000 calls per day, with an average of 2,000 input tokens and 500 output tokens per call
    9. daily = 1000 * estimate_cost(2000, 500,
    10. price_in_per_million=1.0,
    11. price_out_per_million=2.0)
    12. print(f"Estimated daily cost (placeholder prices): {daily:.2f}")

    When estimating, note the following:

    • Token counts should be based on the usage fields returned by the provider or actual tokenization results. Do not roughly substitute character counts.
    • Before launch, test with a small batch of real requests, calculate the average input and output tokens, and model costs accordingly.
    • The peak_factor should be set according to the actual distribution of call times, not simply set to the default value.

    5. Common Misconceptions

    1. Assuming that a web or app entry point can replace an API. A web interface cannot be directly integrated into a business system and is not suitable for large-batch processing.
    2. Estimating only input costs. Output tokens for long answers may be greater than the prompt itself, so the output portion cannot be ignored.
    3. Ignoring context accumulation. In multi-turn conversations, historical content is repeatedly counted as input in each turn. The more turns there are, the higher the per-call cost.
    4. Inferring token counts from character or word counts. Mixed Chinese and English text, code, and special symbols have very different token ratios, and character-based estimates can have significant errors.

    6. Practical Recommendations

    • Account separately by access point. Establish separate budgets for web usage and programmatic calls to avoid mixing them and making tracing difficult.
    • Establish usage monitoring for API calls, record the input and output token counts of each request, and set usage alerts.
    • Streamline prompts, remove context unrelated to the task, and set a reasonable maximum length for output.
    • Add caching for requests with reusable results to avoid repeated charges for identical input.
    • Schedule batch tasks during off-peak periods, set a budget cap for each task, and stop automatically when the cap is exceeded.

    After completing these steps, teams can clearly understand where each cost comes from and keep expenses within a predictable range.