Xai API Pricing (Updated 2026)
Compare pricing for all 8 Xai models. Prices shown per 1M tokens with historical trends.

Best LLMs for OpenClaw— Vote for which model works best with OpenClaw
112 out of our 301 tracked models have had a price change in February.
Get our weekly newsletter on pricing changes, new releases, and tools.
Overview
Model Release Timeline
10 releasesAll Xai Models
Compare pricing for all 8 Xai models.
Current Pricing (per 1M tokens)
10 models
Model | Input $/M | Output $/M | Coding | MMLU | GPQA | Cache Read | Cache Write | Context | Actions |
|---|---|---|---|---|---|---|---|---|---|
$0.200 | $0.500 | 39.9 | 74.3 | 63.7 | $0.050 | - | 2,000,000 | ||
Grok 4.1 Fast Thinking | $0.200 | $0.500 | 82.2 | 85.4 | 85.3 | $0.050 | - | 2,000,000 | |
$0.200 | $0.500 | 40.1 | 73.0 | 60.6 | $0.050 | - | 2,000,000 | ||
Grok 4 Fast Thinking | $0.200 | $0.500 | 83.2 | 85.0 | 84.7 | $0.050 | - | 2,000,000 | |
$0.200 | $1.500 | 65.7 | 79.3 | 72.7 | $0.020 | - | 256,000 | ||
$0.300 | $0.500 | — | — | — | $0.075 | - | 131,072 | ||
$0.300 | $0.500 | — | — | — | $0.075 | - | 131,072 | ||
$3.000 | $15.000 | 81.9 | 86.6 | 87.7 | $0.750 | - | 256,000 | ||
$3.000 | $15.000 | 42.5 | 79.9 | 69.3 | $0.750 | - | 131,072 | ||
$3.000 | $15.000 | — | — | — | $0.750 | - | 131,072 |
* Some models use tiered pricing based on prompt length. Displayed prices are for prompts ≤ 200k tokens.
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