For inference, compare paying per input and output token. Choose the API provider and model for each workload; the comparison lists them beside the on-premises model. Each use case’s typical prompt length selects its pricing tier, including long-context output rates. Expand “Rate basis & source” to inspect the applied tier. Enable Fast mode where available, or Priority processing for xAI; the published speed premium applies to the selected context tier before the cache blend. Split mixed short and long requests into separate profiles. Each workload has its own cached-input toggle and cache-hit rate beneath its model selection. Custom cached-input rates default to the regular input price until you supply a quote. Token API compares inference workloads only, excluding training and fine-tuning from both sides. Shared on-premises costs are allocated by reserved server or rack capacity; shared operating costs follow installed GPU capacity. AWS IaaS compares all workloads. Training-only plans can use AWS IaaS.
Request rate = your explicit requests-per-second target, or current modeled completed requests per second × utilization limit. Default limits are 65% for Interactive, 75% for Mixed and 85% for Batch; Advanced can override them.
Current modeled capacity includes prompt processing and generation. Per replica group: response seconds = (first-token milliseconds + (output length − 1) × milliseconds per output token) ÷ 1,000; completed requests per second = simultaneous requests in the group ÷ response seconds. Add the groups for cluster capacity.
Requests over the period = request rate × operating hours per year × 3,600 × years × average load percentage ÷ 100.
Output tokens = requests × typical output length. Input tokens = requests × typical input length.
Blended input rate = uncached input share × input rate + cache-hit share × cached rate + cache-write share × write rate. Shares add to 1; all prices are per million tokens.
API total = input tokens ÷ 1 million × blended input rate + output tokens ÷ 1 million × output rate.
Effective cost per million output tokens = total cost ÷ output tokens × 1 million. Use full on-premises TCO for one side and API total for the other, with the same output-token volume.
For one API model: effective cost per million output tokens = output rate + (typical input length ÷ typical output length) × blended input rate. For multiple use cases, add costs and output tokens first, then divide.
Example: With 1,024 input and 256 output tokens per request, the input/output ratio is 4. At example rates of $3/million input and $15/million output with no caching: effective API cost = $15 + 4 × $3 = $27 per million output tokens. At 10 billion output tokens, API total is $270,000. If full on-premises TCO for that same volume and period is $100,000, its effective cost is $10 per million output tokens. Cost per individual output token is the per-million figure divided by 1 million.
Known-capacity plans
Without workload sizing, Token API uses a full-context coding estimate: GLM-5.3, 872,000 input and 128,000 output tokens per request, FP4 weights, and 8-bit KV cache. It assumes continuous use with no latency target, prefix reuse, or speculative decoding. The model comparison identifies this basis above the cost worksheet; expand Capacity details to inspect it. Comparing models does not compare their quality.
Utilization headroom and average load are separate: headroom limits peak serving capacity; average load reduces billed token volume during operating hours. Lower usage does not reduce the provisioned on-premises hardware purchase. Zero output volume has no defined cost per output token.