Xai API Pricing (Updated 2026)
Compare pricing for all 9 Xai models. Prices shown per 1M tokens with historical trends.
Get our weekly newsletter on pricing changes, new releases, and tools.

Deploy OpenClaw in Under 1 Minute— We handle hosting, scaling, and maintenance
Overview
Model Release Timeline
10 releasesAll Xai Models
Compare pricing for all 9 Xai models.
Model | Context | Input | Output | Coding | MMLU | GPQA | Cache Read | Cache Write | Actions |
|---|---|---|---|---|---|---|---|---|---|
2.0M | $0.200 | $0.500 | 39.9 | 74.3 | 63.7 | $0.05 | - | ||
Grok 4.1 Fast Thinking | 2.0M | $0.200 | $0.500 | 82.2 | 85.4 | 85.3 | $0.05 | - | |
2.0M | $0.200 | $0.500 | 40.1 | 73.0 | 60.6 | $0.05 | - | ||
Grok 4 Fast Thinking | 2.0M | $0.200 | $0.500 | 83.2 | 85.0 | 84.7 | $0.05 | - | |
256K | $0.200 | $1.500 | 65.7 | 79.3 | 72.7 | $0.02 | - | ||
131K | $0.250 | $0.500 | 69.6 | 82.8 | 79.1 | $0.075 | - | ||
131K | $0.300 | $0.500 | — | — | — | $0.075 | - | ||
256K | $3.000 | $15.000 | 81.9 | 86.6 | 87.7 | $0.75 | - | ||
131K | $3.000 | $15.000 | — | — | — | $0.75 | - | ||
131K | $3.000 | $15.000 | — | — | — | $0.75 | - | ||
131K | $5.000 | $25.000 | — | — | — | - | - |
* Some models use tiered pricing based on prompt length. Displayed prices are for prompts under 200k tokens.
Showing lowest price across all providers. Benchmarks from Artificial Analysis and HuggingFace Open LLM Leaderboard.
Cost vs. Quality
Compare Xai models by benchmark performance and cost.
Community Ratings
Rate how well Xai models perform across popular AI coding tools.
Historical Pricing Trends
No historical pricing data available for this provider.
Try Xai Models
Cost Calculator
Estimate your costs for any Xai model based on expected token usage.
Open Cost CalculatorTry in Playground
Test Xai models directly in your browser.
Open Playground