Learn to compare token, cached-input, batch and GPU-hour inference billing with pricing formulas and workload-based cost checks.
Learn how open-weight LLM API pricing works across tokens, cached input, batch jobs and GPU billing, with practical cost examples from CompareInference.
Hosted open-weight inference is billed by token usage or by deployed capacity, under provider-specific rules. Open weights don’t remove hosting charges or license obligations. This guide explains per-token, cached-input, asynchronous batch, and dedicated-capacity billing (including GPU-hour charges), then shows how to compare costs at the workload level. Prices quoted are as of November 11, 2026.
LLM inference billing measures either the tokens a model processes or the capacity available to run it, and open-weight models can be billed either way. CompareInference’s evaluation framework separates usage charges from capacity commitments, including idle GPU costs, reserved throughput, and support contracts, so you don’t end up comparing a token price with a capacity rate that covers different things.
Per-token APIs commonly publish separate prices per million input tokens and per million output tokens. Input (the prompt) and output (the completion) therefore contribute separately to the bill.
For a request without caching or other discounts, the calculation is:
Request cost = (input tokens × input rate + output tokens × output rate) ÷ 1,000,000
Both rates must be expressed per million tokens. Comparing only the input rate leaves out the completion charge. OpenRouter, for example, calculates request costs using provider-reported usage and deducts those costs from prepaid credits. Tokens determine the request charge, while credits fund it.
Cached-input pricing applies a different rate to eligible input that successfully matches cached content. It doesn’t add a separate quantity of input on top of the prompt total.
Groq makes this distinction explicit in its usage fields:
prompt_tokens reports total input tokens.completion_tokens reports generated output tokens.prompt_tokens_details.cached_tokens reports the cached subset of input.To calculate the input charge, split total input into uncached and cached portions, then apply their respective rates. Do not add cached tokens to total input again.
Groq’s caching is automatic on supported models, requires matching cached content, and discounts successful cache-hit input by 50% with no additional caching fee. Hits depend on matching content, so budget from measured hit rates.
An asynchronous Batch API accepts work for later processing instead of returning an immediate response. Groq, for example, uses uploaded JSONL requests and asynchronous result retrieval, with configurable processing windows from 24 hours to seven days. It’s built for offline work, not real-time chat.
Groq offers a 50% discount against synchronous prices on supported models. That discount does not stack with prompt caching: all batch tokens receive batch pricing regardless of cache status.
Other providers set their own eligibility rules. Together AI offers discounts of up to 50% for selected batch models; unlisted models run at standard rates, and dedicated inference does not receive the batch discount. Fireworks prices asynchronous batch inference at 50% off its serverless per-token rates.
A Batch API is also different from serving-engine batching. An engine can batch requests to increase aggregate throughput and lower dedicated cost per token, with possible trade-offs in individual-request latency. That scheduling mechanism is separate from submitting asynchronous jobs under a batch pricing program.
A GPU-hour price is a rate for capacity; it doesn’t mean the provider bills in whole hours. Fireworks on-demand deployments are metered per GPU-second with no charge for startup time, even though its rate card also shows hourly prices.
Together AI bills dedicated inference by the minute for each ready replica, regardless of token or request volume. Provisioning and cold-start time are excluded, and billing stops when replicas scale down. Ready but idle replicas still incur charges, so minimum replica settings set a cost floor.
Together lists an H100 80GB at $5.49 per GPU-hour and a B200 180GB at $8.99 per GPU-hour. Configured GPU counts multiply the single-GPU rate, and additional replicas bill independently. A comparison therefore needs the GPU count, replica count, and billable ready time, not just the headline hourly rate. Low or bursty traffic generally favors serverless token billing, while sustained utilization can favor dedicated capacity.
Amazon Bedrock Custom Model Import is a managed API that doesn’t use ordinary token billing. It uses Custom Model Units, with active model copies billed in five-minute windows. Required units depend on model characteristics, and AWS also lists monthly model storage charges.
| Billing model | What is metered | Documented example | What to check |
|---|---|---|---|
| Per-token | Input and output token counts at separate rates | OpenRouter calculates charges from provider-reported usage | Compare both input and output rates, not input alone |
| Cached input | Cache-hit input within the total input count | Groq discounts successful cached input by 50% | Supported models and matching content are required |
| Asynchronous batch | Tokens processed under an eligible batch program | Groq offers 50% off supported synchronous prices; Together offers up to 50% on selected models | Eligibility varies; Groq’s cache and batch discounts do not stack |
| GPU capacity | Billable capacity time and configured resources | Fireworks meters per GPU-second; Together bills ready replicas by the minute | The hourly price isn’t the billing increment; idle ready capacity still bills |
| Imported-model capacity units | Active model copies through Custom Model Units, plus listed storage charges | Bedrock Custom Model Import uses five-minute billing windows | Imported models do not support batch inference |
Bedrock’s batch discounts for selected foundation models don’t apply to imported weights, because Custom Model Import doesn’t support batch inference.
A low advertised token rate isn’t the same as the lowest cost for your workload. Comparisons need consistent model assumptions, input/output mix, utilization, and service requirements. Baseten identifies batch size, traffic utilization, and input/output sequence lengths as major variables in dedicated inference costs, and recommends comparing total API spend against total dedicated spend. Scheduling also changes the comparison: DeepInfra lists Standard at 1× base price, Priority at 1.5×, and Flex at 0.8×. Flex’s lower rate comes with slower responses and occasional unavailability, so it isn’t the same service at a lower price.
Normalize the model and workload first, then compare total spend under the service requirements you need, keeping token usage charges separate from dedicated capacity commitments, idle GPU costs, reserved throughput, and support contracts.
An LLM cost estimate can use the correct published rates and still miss the actual bill. Common errors come from counting token categories incorrectly, applying discounts outside their eligibility rules, or leaving capacity and platform charges out of the budget.
prompt_tokens and cache-hit input in prompt_tokens_details.cached_tokens. Cached tokens are already part of total input, not extra tokens. For cache-priced requests, subtract cached tokens from total input before applying the uncached rate, then price the cached portion separately.Before comparing estimates, reconcile cached and uncached usage, check discount eligibility and stacking rules, include all billed output and applicable fees, and account for minimum capacity commitments.
A fair comparison needs more than a headline token rate. Record the model, service level, usage assumptions, and billing conditions behind each estimate so a lower apparent price doesn’t hide a different capacity commitment or operating requirement.
CompareInference’s provider directory and side-by-side comparisons, which flag unpublished information, can help you organize this research and the questions to ask each provider.
Start with a fixed workload, then calculate each billing model against it. The workflow below separates provider-published rates from derived arithmetic and keeps token charges distinct from dedicated-capacity commitments. The goal is a comparable full-bill estimate, not a comparison of isolated headline prices.
Hold the model, total input and output volumes, input/output sequence lengths, traffic pattern, and service requirements consistent across alternatives. Record these assumptions before collecting prices so a cheaper configuration doesn’t quietly become a different workload.
For dedicated inference, include batch size and traffic utilization in the evaluation. Baseten identifies both, along with sequence lengths, as major cost variables.
Decision output: a shared workload specification for evaluating token-based APIs, asynchronous batch processing, and dedicated capacity.
For an endpoint with separate rates for these three token categories, use the following formula. All rates must be expressed per million tokens:
Token cost = ((total input tokens − cached input tokens) × input rate + cached input tokens × cached-input rate + output tokens × output rate) / 1,000,000.
Add applicable fees separately.
Together AI lists GLM-5.3-Flash at $0.15 per million input tokens, $0.03 per million cached-input tokens, and $0.50 per million output tokens. These rates are specific to this model.
The following table works through 10 million total input tokens, including 6 million cached tokens, plus 2 million output tokens. Subtracting cached input leaves 4 million uncached input tokens.
| Token category | Billable tokens | Rate per million | Cost |
|---|---|---|---|
| Uncached input | 4,000,000 | $0.15 | $0.60 |
| Cached input | 6,000,000 | $0.03 | $0.18 |
| Output | 2,000,000 | $0.50 | $1.00 |
Total: $1.78 before other applicable charges. Without cache hits, the same workload costs $2.50: $1.50 for 10 million input tokens plus $1.00 for output.
Calculation output: an itemized token bill that shows the effect of cached-input pricing.
Replace assumed cache usage with reported usage. Groq defines the token cache-hit rate as:
Cache-hit rate = cached_tokens / prompt_tokens × 100%.
Use the reported cached-token and prompt-token counts for the workload being evaluated, and feed the measured cached-token count back into the token-cost formula.
Calculation output: a cache-adjusted estimate grounded in actual usage, with the uncached portion still billed at the standard input rate.
Identify work that can tolerate asynchronous completion before combining it with interactive traffic. Together AI recommends batch processing for classification, evaluations, synthetic data, and offline summarization.
Evaluate those jobs using the applicable batch pricing and completion requirements. Together AI’s 24-hour completion window is a best-effort target (not a guaranteed deadline); successful batch responses are billed, and failed requests are not.
Decision output: a separate estimate for eligible offline work, and a clear call on whether its timing requirements fit batch processing.
For each replica, collect billed runtime, configured GPU count, and the applicable GPU rate. Convert runtime to the rate’s time unit before multiplying (for example, use hours with a GPU-hour rate).
The compute formula is:
Dedicated compute spend = Σ across replicas (billed runtime × configured GPU count × GPU rate).
Keep capacity commitments, idle GPU costs, reserved throughput, and support contracts separate from usage-based token charges when building the full comparison.
Calculation output: total dedicated compute spend over the same evaluation period used for the API workload, with other applicable charges listed separately.
Using measured output from the dedicated deployment, calculate:
Effective cost per million output tokens = total dedicated spend / actual output tokens × 1,000,000.
This is a derived normalization metric, not a list price. Compare the dedicated total with the API’s full input-plus-output bill for the same workload, not with its output-token rate alone. Batch size, utilization, and sequence lengths all move the break-even point.
The final comparison should keep the same workload and service requirements while showing token charges, measured cache usage, eligible batch work, and dedicated capacity separately.
Build a budget around documented billing rules and your workload’s requirements, not just the lowest advertised token rate. Use this checklist to keep assumptions explicit and comparisons consistent.
The right billing model depends on traffic patterns, tolerance for deferred processing, and eligibility for provider discounts.
CompareInference provides an AI inference provider research directory and a side-by-side comparison workspace to help teams build shortlists. The workspace lets you select two platforms for a qualitative overview and flags information that providers haven’t published. Its pricing methodology separates token usage charges from dedicated capacity commitments, idle GPU costs, reserved throughput, and support contracts, and normalizes prices across models before comparing them.
Open-weight availability doesn’t make hosted inference free. Compare full bills for the same model, workload, and service requirements, not just headline rates. Account for token categories, discount eligibility, metering increments, utilization, and applicable fees, and keep usage charges separate from dedicated capacity commitments, idle GPU costs, reserved throughput, and support contracts.
Before choosing a provider, define your workload and check current pricing terms, since rates change often. Use CompareInference to research providers, compare deployment options, and build a shortlist, then confirm current rates, eligibility conditions, and service terms with the providers you shortlist.
Open-weight LLM APIs charge either for tokens processed or for serving capacity. Per-token pricing commonly separates input and output rates, quoted per million tokens. Cached input may have its own rate, and asynchronous batch processing can use discounted pricing. Capacity-based services bill for resources over time, so their charges don’t track token volume directly. Check which billing mechanism applies to the endpoint you’re pricing.
No. Open-weight availability doesn’t remove the cost of hosted execution or the obligation to comply with the model’s license. Amazon Bedrock, for example, supports importing customized models but charges for running inference and requires compliance with applicable model licenses. Access to weights and payment for a hosted service are separate questions, so budget the hosting charges and check the license before treating an open-weight model as a free alternative to a paid API.
Subtract cached input from total input before applying the ordinary input rate. With rates per million tokens, use: cost = ((total input − cached input) × input rate + cached input × cached rate + output × output rate) / 1,000,000. This assigns each input token to one billing category. Add any separately applicable fees.
It depends on the provider. Groq says its Batch API’s 50% discount against synchronous pricing on supported models doesn’t stack with prompt-caching discounts; all Groq batch tokens receive the batch rate regardless of cache status. For Groq, don’t apply a cached-input discount and then halve the result again. Check each provider’s documentation for how its discounts interact.
A GPU-hour rate is a price; the billing increment determines how usage time is metered. Together AI bills dedicated inference by the minute for each ready replica, regardless of token volume, with no charge for provisioning or cold starts. Fireworks on-demand deployments are metered per GPU-second with no charge for startup time, even though prices are also shown in hourly units. An hourly rate card doesn’t mean hour-long billing increments.
Dedicated capacity is cheaper when its total billed compute spend falls below the API’s full input-plus-output bill for the same workload. Calculate dedicated spend by summing each replica’s billed runtime multiplied by its configured GPU count and rate, using matching time units. Actual utilization, batch size, input/output sequence lengths, and GPU configuration all affect the result, so the break-even point is specific to your workload.
No. For Custom Model Import, Amazon Bedrock uses Custom Model Units rather than per-token billing. Active model copies are billed in five-minute windows, and the required units depend on model characteristics. AWS also lists monthly model storage charges. Custom Model Import doesn’t support batch inference, so Bedrock’s discounted batch pricing for selected catalog models doesn’t apply to imported weights.
Pricing and billing examples cross-checked against provider documentation on November 11, 2026. Rates and eligibility can change; confirm current terms with providers. This is source-led research, not an independently reproduced performance or cost benchmark.