xAI Models API Cost Calculator & Comparison

Every xAI model, side by side — current API rates, context window, benchmarks, and a live calculator that ranks them at your exact workload. 10 active models, 10 with public pricing. Prices refreshed daily.

Models tracked

10

Active

10

With public pricing

10

Cheapest input

$0.20/1M

Calculate your xAI API cost at your workload.

Set your workload — every priced model ranks in real time.

Adjust the workload

Every model below updates in real time.

1,00010,00050,000250,0001M10M

Ranked by your monthly bill

No models with public pricing available to compare right now.

Pricing at a glance

Blended $/1M tokens across the lineup.

Blended price uses a 3-to-1 input/output ratio. Green bar = cheapest.

Quick picks

Best xAI model for your use case.

As of April 2026, xAI offers 10 active models via API, ranging from $0.20/1M to $3.00/1M input tokens. The most context-rich model handles up to 2M tokens. Models support vision, deep reasoning, tool use. All prices are USD per 1 million tokens.

Quality vs price

xAI benchmarks at a glance.

Each point is one model — X is blended $/1M tokens, Y is the average of available quality benchmarks. Larger bubbles mean larger context windows.

Per-model benchmark scores

ModelAvgScores
Grok 476.5
MMLU Pro86.6GPQA Diamond88SWE-Bench Verified72AIME 202494AA Intelligence Index42
Grok 3 Mini57.0
AA Intelligence Index57
Grok 3 Mini Beta57.0
AA Intelligence Index57
Grok 4.2048.0
AA Intelligence Index48
Grok 4.20 Multi-Agent48.0
AA Intelligence Index48
Grok 345.0
AA Intelligence Index45
Grok 3 Beta45.0
AA Intelligence Index45

Every model

Every xAI model — pricing, context & capabilities.

ModelContextInput /1MOutput /1M
Grok 4.202M$2.00$6.00
Grok 4.20 Multi-Agent2M$2.00$6.00
Grok 4.1 Fast2M$0.2$0.5
Grok 4 Fast2M$0.2$0.5
Grok Code Fast 1256K$0.2$1.50
Grok 4256K$3.00$15.00
Grok 3 Mini131K$0.3$0.5
Grok 3 Mini Beta131K$0.3$0.5
Grok 3131K$3.00$15.00
Grok 3 Beta131K$3.00$15.00

FAQ

Questions fréquentes

Pricing patterns, best-known use cases, and how this provider stacks up.

Get instant answers from our AI agent

xAI API pricing ranges from $0.20 to $3.00 per 1M input tokens. Output tokens cost more than input on every model. Prices are per 1 million tokens (1M ≈ 750,000 words). Use the calculator above to estimate your monthly spend at your actual workload.
Grok 4.1 Fast is the lowest-priced xAI model with public pricing at $0.20/1M input tokens. It suits high-volume tasks where cost matters most — classification, extraction, summarization, and similar workloads that don't need frontier reasoning.
Grok 4 is xAI's highest-tier model at $3.00/1M input. It delivers the most sophisticated reasoning, instruction-following, and nuance. For workloads that don't require frontier performance, a mid-tier model typically cuts inference costs substantially.
Grok 4.20, Grok 4.20 Multi-Agent, Grok 4.1 Fast and 4 more support deep reasoning mode, which improves performance on multi-step coding, debugging, and code review. For simpler autocomplete or snippet generation, a faster, cheaper model often delivers acceptable quality at a fraction of the cost.
Grok 4.20, Grok 4.20 Multi-Agent, Grok 4.1 Fast and 7 more support function calling (tool use), required for agentic workflows. Agents need a model that reliably follows structured output schemas — test with your specific tool definitions before committing to production volumes.
Yes — Grok 4.20, Grok 4.20 Multi-Agent, Grok 4.1 Fast, Grok 4 Fast and 6 more accept image input alongside text. You can pass screenshots, photos, charts, and documents for analysis. Vision adds no separate line-item on most xAI models — you're billed for the token equivalent of the image.
Yes — xAI supports prompt caching (discounts for repeated context) and batch processing (accept a delay, cut costs ~50%). These rates appear in the table above under "Cached /1M" and "Batch /1M." Caching pays off quickly if your prompts share a long system prompt or document prefix across many calls.
xAI has historically adjusted prices when launching new model generations, often cutting rates to stay competitive. Buzzi.ai snapshots pricing daily — you can subscribe to price-drop alerts on any xAI model using the "Alert me" button on its detail page.
Use the main comparison wizard to run the same calculator across xAI, Anthropic, Google, Meta, Mistral, and 20+ other providers. Set your exact workload and get a ranked cost chart in under a minute.
Grok 4.20, Grok 4.20 Multi-Agent, Grok 4.1 Fast, Grok 4 Fast and 3 more offer an extended thinking or reasoning mode. The model spends extra compute "thinking" before answering — slower and more expensive, but meaningfully better on complex, multi-step problems. Standard mode is faster and cheaper for routine tasks.

Look wider

Compare xAI against other providers.

Open the full wizard — pick a use case, set your usage, and cross-compare against OpenAI, Anthropic, Google, and 20+ more.