AI Coding Assistant Token Billing Explained: Official Pricing and Group Multipliers

    This article explains how token billing works for AI coding assistants and LLM API gateways. It clarifies that token counting is consistent across access groups for a given model, while a group multiplier is applied only to the final charge. It covers input, output, and cached-token pricing; how multipliers work; why resource-pool groups have different rates and model coverage; common billing misinterpretations involving default price views and platform credits; and practical methods for estimating, verifying, and managing costs.

    AI Coding Assistant Token Billing Explained: Official Pricing and Group Multipliers

    1. The Short Answer: Token Counting Is Consistent; Only the Multiplier Changes

    Developers using AI coding tools or LLM API gateways often ask why the same model can produce very different charges when accessed through a different group. Does each group tokenize text or count tokens differently?

    No. For a given model, the tokenization method and counting rules are identical across groups. The difference comes only from the final step: multiplication by the group multiplier.

    The billing flow can be summarized as:

    1. Actual charge = Request cost at upstream official list prices × Multiplier for the group associated with the current API key

    In other words, the gateway first uses the model provider’s published prices to calculate a request cost based on input tokens, output tokens, and cached tokens. It then multiplies that amount by the multiplier assigned to the group associated with your API key. The result is the amount deducted from your account balance.

    To determine the cost of a request, you need only two pieces of information:

    1. The base cost calculated from official list prices
    2. The multiplier for the group associated with your key

    2. Basic Billing Structure: Three Types of Unit Prices

    Before examining multipliers, it is important to understand how official list prices are structured. Most mainstream large language models are billed by usage, with separate prices for different operations, usually expressed in USD per million tokens:

    • Input token price: Applies to the context you send to the model, including prompts, code snippets, and system instructions. It is often the lowest of the three rates.
    • Output token price: Applies to generated content such as code completions, explanations, and answers. It is often several times the input price because generation requires more computation.
    • Cache read price: If a request hits a prefix cache, such as when a coding assistant repeatedly sends the same system prompt and project context, the cached portion is charged at a much lower rate. This is often around one-tenth of the regular input price or less.

    Consider a hypothetical high-end model priced at $4 per million input tokens, $20 per million output tokens, and $0.20 per million cached tokens. Suppose a request consumes 100,000 input tokens and 20,000 output tokens, with 80,000 of the input tokens hitting the cache. The official-list cost would be:

    1. Regular input cost = 20,000 / 1,000,000 × $4 = $0.08
    2. Cache read cost = 80,000 / 1,000,000 × $0.20 = $0.016
    3. Output cost = 20,000 / 1,000,000 × $20 = $0.40
    4. Official-list total ≈ $0.496

    If your group multiplier is 2, the actual charge is $0.992. If the multiplier is 0.6, the charge is $0.2976. The model has not changed, and the token count has not changed; only the multiplier has.

    3. Why Group Multipliers Exist

    Groups exist primarily because service providers isolate resources by stability, concurrency capacity, and account source. Different resource pools have different procurement and operational costs, which leads to different multipliers. Common group types include:

    • Low-cost pool groups: Multipliers are often below 1, such as around 0.6. These use quota from special channels and cost less, but model coverage may be incomplete and queues may occur during peak periods.
    • Standard subscription pool groups: Multipliers are typically around 2 and correspond to subscription-based account resources. These are suitable for individual developers’ daily use.
    • Official-direct stable groups: Multipliers are higher, such as around 3.5. These use official direct API keys and generally provide the best stability and response speed for availability-sensitive workloads.
    • Enterprise custom groups: Multipliers are negotiated. These provide high-concurrency quotas, dedicated channels, and dedicated support for organizations with large-scale usage.

    Two points require attention. First, multipliers are not fixed; they can change with upstream costs and resource-pool conditions. Check the currently effective multiplier on the gateway platform before use. Second, different groups support different model lists. A low-cost group may cover only some mainstream models. If you call a model that the group does not support, the request will fail rather than automatically being billed under another group’s rate. This is especially important when designing fallback logic.

    4. Three Billing Details That Are Easy to Misread

    4.1 The Multiplier Applies to the Official List Price, Not the Token Count

    Some users assume that a multiplier is implemented by counting more tokens, and they try to compare token statistics across groups to verify the multiplier. In practice, token counts should be consistent across groups. The multiplier appears only in the final amount.

    To verify a bill correctly, calculate the base cost using token details and official unit prices, then compare the final charge with the group multiplier.

    4.2 The Default Price View May Already Include a Multiplier

    Many gateway price cards show a price before a specific group is selected, such as in a default “All” view. The displayed price may not be the official list price; it may already include a default multiplier, commonly 2x. For example, a model officially priced at $4 input and $20 output may appear as $8/$40 in the default view.

    Before reviewing prices, select the group actually associated with your key. Otherwise, you may incorrectly conclude that the platform is twice as expensive as the official provider, even though your own group’s multiplier may be much lower than 2.

    4.3 a Dollar Sign May Represent Platform Credits, Not Actual USD

    Some gateways use prepaid credits or local-currency balances rather than true USD. A balance displayed as “$9” may represent nine platform credit units rather than nine US dollars, while a direct official API is paid in actual USD. For a meaningful comparison, convert both sides to a common currency and then apply their respective multipliers or credit conversion rules. Ignoring this step can lead to order-of-magnitude errors.

    5. Practical Advice for Accurate Cost Calculation

    1. Build a cost-estimation model: Record the token consumption profile of typical tasks, including the proportions of input, output, and cached tokens. Multiply those figures by official prices and your group multiplier to establish a baseline cost per task.
    2. Use caching effectively: Coding assistants send a large amount of fixed context with every request. Confirm that cache hits occur so that input costs are reduced. Cache read prices are usually below one-tenth of regular input prices.
    3. Check model coverage before choosing a group: Confirm that every model you need, including flagship, lightweight, and long-context versions, is supported by the target group.
    4. Review multipliers regularly: Include “check today’s multiplier” in your cost-monitoring process to avoid budget deviations caused by multiplier changes.
    5. Distinguish displayed prices from paid prices: Base decisions on “price after group selection × actual token consumption,” not on numbers from the default view.

    6. Conclusion

    Billing for large language models may appear complex, but its core is one multiplication: token accounting is consistent across groups, and the group multiplier determines the final price. By mastering the formula “official-list cost × group multiplier” and understanding three common traps, namely that displayed prices may include a default multiplier, platform credits may not equal US dollars, and group model coverage may have gaps, you can calculate costs quickly and accurately on any gateway or relay platform. This provides a reliable basis for technical selection and budget management.