LLM API Billing: How Group Pricing Multipliers Work
LLM API charges can differ between API keys even when token usage is identical. This article explains how group pricing multipliers apply to base token costs, how caching and displayed prices affect billing, and how to reconcile charges and control costs without confusing pricing changes with token metering.
Why Identical Requests Can Have Different Charges
AI coding assistants, chat applications, and batch inference jobs ultimately rely on individual model calls. After a call completes, the server typically returns usage statistics.
When the same prompt costs different amounts under different API keys, it is tempting to assume that token counting has changed. More often, the metering rules are the same. The difference occurs at the final billing step: the cost calculated from published base rates is multiplied by the pricing multiplier assigned to the API key’s group.
Separating these two layers makes the bill much easier to understand.
What a Request Actually Consumes
Usage is usually more detailed than a single total token count. Caching, conversation history, and response length split consumption into several categories:
- Uncached input: Tokens submitted in the request that do not hit the prefix cache.
- Output: New tokens generated by the model.
- Cache reads: Tokens read from cached context, typically priced below fresh input.
- Cache writes: Tokens written to the cache for later reuse, which some billing systems price separately.
Each category has its own rate, usually quoted per million tokens. A request’s base cost can be expressed as:
Base cost =Input tokens × Input rate+ Output tokens × Output rate+ Cache-read tokens × Cache-read rate+ Cache-write tokens × Cache-write rateBalance deduction = Base cost × Group multiplier
Token quantities and rates must use matching units. If rates are quoted per million tokens, divide each token count by one million before multiplying.
Here, “base cost” means the cost calculated using the upstream provider’s or platform’s published baseline rates—not the amount ultimately deducted from your account. The multiplier applies to the entire base cost, rather than to just one token category.
Cheap cache reads therefore do not make the group multiplier irrelevant. It scales all four cost components.
The following example illustrates the calculation only; the numbers do not represent any vendor’s current prices. Rates in this example are expressed per token:
Input 2_000_000 × 0.000004 = 8Output 200_000 × 0.000020 = 4Cache reads 5_000_000 × 0.0000002 = 1Cache writes 100_000 × 0.000005 = 0.5Base cost = 8 + 4 + 1 + 0.5 = 13.5With a group multiplier of 0.8:Balance deduction = 13.5 × 0.8 = 10.8With a group multiplier of 2:Balance deduction = 13.5 × 2 = 27
With identical usage and base rates, charges vary in direct proportion to the multiplier.
Where Group Multipliers Fit in the System
An API proxy or aggregation gateway typically handles three responsibilities: authentication, request forwarding, and accounting.
The upstream provider returns usage according to its own metering rules. The gateway does not need to recount tokens for each group. Instead, it can:
- Convert usage into a base cost using the baseline rates.
- Look up the group assigned to the API key and its applicable multiplier.
- Multiply the base cost by that multiplier and deduct the result from the corresponding balance.
- Record usage, rates, the multiplier, and the deduction for later reconciliation.
Groups may also define rate limits, concurrency quotas, available models, and reliability policies. The multiplier is only one pricing dimension.
Enterprise groups may have separately negotiated concurrency limits and settlement periods. A lower multiplier does not automatically make a group the better choice.
Three Common Sources of Confusion
Displayed Prices May Already Include the Multiplier
When a model catalog or console displays prices by group, its input and output rates often already equal:
Displayed group rate = Base rate × Group multiplier
Applying the multiplier again would count it twice.
Use one consistent reconciliation method: either calculate the base cost and apply the multiplier, or calculate the cost directly using the group-adjusted rates. Do not mix the two.
The Default “All” View May Not Show Base Rates
A default model listing may use a standard display multiplier to make comparisons easier. That does not necessarily mean the displayed prices are the published base rates—or the rates applicable to your API key.
Before interpreting prices, select the group actually assigned to the key and check the displayed rates and accompanying notes.
Currency Symbols May Represent Credits, Not Actual Currency
Some platforms account in credits while displaying a familiar currency symbol. A nominal 1:1 top-up conversion may describe the relationship between payments and credits, not a live foreign-exchange conversion.
Before comparing those charges with an upstream provider’s bill settled in an actual foreign currency, establish:
- What each credit represents.
- Whether the prices include taxes.
- Which exchange rate applies and when it is determined.
Otherwise, a lower-looking unit price can still translate into a higher cost in your payment currency.
Model Availability and Pricing Are Separate Questions
Groups typically have model allowlists. If an API key requests a model that its group does not support, the request should fail—not silently switch to another group and incur charges under a different multiplier.
Before deployment, verify three things:
- Which group the API key belongs to.
- Whether that group includes the target model.
- Whether all four applicable token rates are defined for that model in that group.
Treat missing information as a client-side configuration error rather than hoping the request will work at runtime.
Missing cache rates should not be temporarily replaced with the input rate. Cache-read and cache-write volumes can greatly exceed fresh input volumes, so using the wrong rate can distort monthly cost estimates by an order of magnitude.
How to Reconcile a Conversation’s Charges
Reconciliation can be reduced to two values and one usage breakdown:
- The base cost calculated from baseline rates.
- The multiplier for the API key’s group.
- The raw token counts for all four usage categories.
The deduction should equal the base cost multiplied by the group multiplier, with any explicitly stated taxes or minimum charges accounted for separately.
Use the following process:
- Read the usage fields in the response. Confirm that the four categories are measured in tokens, not characters or request counts.
- Calculate the base cost using the rates effective at the request time. Price changes should be evaluated against when the request occurred, not when you inspect the bill.
- Retrieve the group multiplier effective at that same time. Historical requests should retain the multiplier that applied when they were made.
- Compare the calculated deduction with the balance ledger. A consistent proportional discrepancy often indicates that displayed group rates and base rates have been mixed. If discrepancies occur mainly with long contexts, first check whether cache reads or writes were omitted or counted twice.
In AI coding workflows, multiple turns may repeatedly include repository excerpts and previous patches. Cache reads can account for a large share of usage. Assuming that a short response must be cheap can therefore underestimate the total cost.
Control Costs Through Engineering
Group selection determines which capacity and pricing tier you buy. Engineering determines how many redundant tokens you send.
- Make stable prefixes cacheable. Put system prompts, project conventions, and long-lived API descriptions near the beginning so cache reads can replace fresh input.
- Limit output length. Patches, diffs, and function-level responses generally consume fewer output tokens than complete file rewrites.
- Match model capability to the task. Simple completion does not need a costly model in a high-multiplier group. Switch when the task requires more complex refactoring.
- Make failures observable. Track limit violations, unavailable models, and cache misses separately to avoid retry storms.
- Separate billing by application, environment, and API key. This makes it easier to identify an automation pipeline repeatedly sending context without producing useful work.
Multipliers can change, and models can become unavailable. Check the current group terms before deployment, then continuously reconcile usage logs with balance transactions. Do not hard-code prices from a one-time screenshot.
Summary
For the same model, token counting usually does not change between groups. What changes is the multiplier applied after calculating the base cost, along with model availability, cache pricing, and the meaning of the account’s balance units.
The key formula is:
Balance deduction = Base cost × Group multiplier
Distinguish baseline rates from group-adjusted rates and default listing prices. Then reconstruct a real request using its four token categories to determine whether the charge is reasonable.
That puts cost optimization where it belongs: caching, output length, and group selection—not repeated speculation that token metering has secretly changed.
