xAI API Pricing
Complete pricing for all xAI models. Input/output costs per 1M tokens, context windows, and rate limits.
Billing terms: priced in USD per 1M tokens unless a row states otherwise; official direct rates are listed separately from third-party channels, and regional prices are kept distinct. Record updated 2026-11-05.
xAI API Pricing Calculator
Select a model to estimate monthly cost using its listed rates on each channel.
Workloads reusing system prompts, long documents, or conversation history hit more; channels without a cached rate are billed at the full input rate.
| Channel | Effective input | Output /1M | Est. / month |
|---|---|---|---|
| openrouter | $0.73(w/ cache) | $2.50 | $3.45 |
Formula: monthly cost = (input tokens × effective input rate + output tokens × output rate) ÷ 1,000,000 × calls. The effective input rate blends list and cached rates at your cache-hit share. Rates share the selected model and billing basis; your vendor bill is authoritative.
Currently available rates
Grok 4.20
LLMx-ai-grok-4.20Grok 4.20 (Non-Reasoning)
LLMxai-grok-4.20-0309-non-reasoningGrok 4.20 (Reasoning)
LLMxai-grok-4.20-0309-reasoningGrok 4.20 Multi-Agent
LLMx-ai-grok-4.20-multi-agentGrok 4.20 Multi-Agent
LLMxai-grok-4.20-multi-agent-0309Grok 4.3
LLMxai-grok-4.3Legacy / superseded version. Newer models are available; official or partner channels may still serve this version.
Replacement reference: xai-grok-4.7Grok 4.3 (batch)
LLMxai-grok-4.3-batchLegacy / superseded version. Newer models are available; official or partner channels may still serve this version.
Replacement reference: xai-grok-4.7Grok 4.5
LLMxai-grok-4.5Legacy / superseded version. Newer models are available; official or partner channels may still serve this version.
Replacement reference: xai-grok-4.7Grok 4.6
LLMxai-grok-4.6Legacy / superseded version. Newer models are available; official or partner channels may still serve this version.
Replacement reference: xai-grok-4.7Grok 4.6 (batch)
LLMxai-grok-4.6-batchLegacy / superseded version. Newer models are available; official or partner channels may still serve this version.
Replacement reference: xai-grok-4.7Grok 4.7
LLMxai-grok-4.7Grok 4.7 (batch)
LLMxai-grok-4.7-batchGrok Build 0.1
LLMxai-grok-build-0.1Grok Imagine Image
Image Genxai-grok-imagine-imageGrok Imagine Video
Videoxai-grok-imagine-videoGrok Imagine Video 1.5
Videoxai-grok-imagine-video-1.5Grok Imagine Video 1.5 Lite
Videoxai-grok-imagine-video-1.5-liteGrok Latest
LLMx-ai-grok-latestLegacy & retired models
Grok Imagine Image 2.0
Image Genxai-grok-imagine-image-2.0Legacy / RetiredThis model was absent from repeated complete catalogs. Availability needs reconfirmation.
Does this change your best option?
Check your models and usage for free. See the relevant official changes, estimated cost, and a practical next step.