API pricing
xAI API pricing
xAI API prices run from $0.20 per million input tokens (Grok 4.1 Fast) to $2 (Grok 4.5). Its highest-ranked model, Grok 4.6, costs $2 input and $6 output per million tokens.
Last verified
Official price list: docs.x.ai
| Cached input | ||||||
|---|---|---|---|---|---|---|
| Grok 4.1 Fast | $0.20 | $0.50 | $0.05 | $0.28 | 128K | 41.4 |
| Grok Build 0.1 | $1 | $2 | $0.20 | $1.25 | 256K | 36.4 |
| Grok 4.20 (Non-Reasoning) | $1.25 | $2.50 | $0.20 | $1.56 | 1M | 48.6 |
| Grok 4.20 Multi-Agent | $1.25 | $2.50 | $0.20 | $1.56 | 1M | 46.2 |
| Grok 4.3 | $1.25 | $2.50 | $0.20 | $1.56 | 1M | 43.8 |
| Grok 4.5 | $2 | $6 | $0.30 | $3 | 500K | 55.0 |
| Grok 4.6 | $2 | $6 | $0.50 | $3 | 500K | 56.9 |
| Grok 4.7 | $2 | $6 | $0.50 | $3 | 500K | 53.1 |
Prices on other platforms
The same models are often sold through clouds and resellers at different rates.
| Model | Route | Input | Output | Checked |
|---|---|---|---|---|
| Grok 4.6 | azure | $2 | $6 | 2026-10-10 |
| bedrock | $2 | $6 | 2026-10-10 | |
| openrouter | $2 | $6 | 2026-10-10 | |
| vertex | $2 | $6 | 2026-10-10 | |
| xai | $2 | $6 | 2026-10-10 | |
| Grok 4.5 | openrouter | $2 | $6 | 2026-10-10 |
| xai | $2 | $6 | 2026-10-10 | |
| Grok 4.7 | bedrock | $2 | $6 | 2026-10-10 |
| openrouter | $2 | $6 | 2026-10-10 | |
| vertex | $2 | $6 | 2026-10-10 | |
| xai | $2 | $6 | 2026-10-10 | |
| Grok 4.20 (Non-Reasoning) | azure | $2 | $6 | 2026-10-10 |
| openrouter | $1.25 | $2.50 | 2026-10-10 | |
| vertex | $1.25 | $2.50 | 2026-10-10 | |
| xai | $1.25 | $2.50 | 2026-10-10 | |
| Grok 4.20 Multi-Agent | openrouter | $1.25 | $2.50 | 2026-10-10 |
| xai | $1.25 | $2.50 | 2026-10-10 | |
| Grok 4.3 | bedrock | $1.25 | $2.50 | 2026-10-10 |
| openrouter | $1.25 | $2.50 | 2026-10-10 | |
| vertex | $1.25 | $2.50 | 2026-10-10 | |
| xai | $1.25 | $2.50 | 2026-10-10 | |
| Grok 4.1 Fast | azure | $0.20 | $0.50 | 2026-10-10 |
| vertex | $0.20 | $0.50 | 2026-10-10 | |
| Grok Build 0.1 | openrouter | $1 | $2 | 2026-10-10 |
| xai | $1 | $2 | 2026-10-10 |
Frequently asked questions
How much does the xAI API cost?
xAI API prices run from $0.20 per million input tokens (Grok 4.1 Fast) to $2 (Grok 4.5). Its highest-ranked model, Grok 4.6, costs $2 input and $6 output per million tokens.
Does xAI discount cached input?
Yes. Cached input is billed at a lower rate on 8 of the 8 priced models; the cached rate is listed next to each model.