xAI API pricing
xAI sells API access to the Grok model family. Every text model has two price tiers — standard, and a long-context tier that reprices the whole request once the prompt reaches 200K tokens.
Official price list: docs.x.ai
Current lineup
Grok 4.6
xAI's current flagship Grok model, with configurable reasoning.
$2.00 in / $6.00 out per 1M
Grok 4.5
Previous Grok flagship revision.
$2.00 in / $6.00 out per 1M
Grok 4.3
Grok generation of early 2026 — one of the few xAI models with a batch discount.
$1.25 in / $2.50 out per 1M
Grok Build 0.1
A lower-cost model in xAI's current lineup, priced for high-volume use.
$1.00 in / $2.00 out per 1M
Grok 4
xAI's 2025 flagship — no longer on xAI's current price list; shown at its last catalog rate.
$3.00 in / $15.00 out per 1M
How xAI billing works
Long-context repricing on every text model: once a request's prompt reaches 200K tokens, ALL tokens in it bill at the long-context rate — roughly 2x input, output, and cached rates.
Cached input is per-model, typically 4–6x cheaper than fresh input.
Batch API: 20% off, but only on grok-4.3 and the grok-4.20 variants — grok-4.6 and grok-4.5 get no batch discount. Priority processing bills 2x, applied only when the response confirms service_tier: "priority".
Server-side tools bill per invocation on top of tokens: web/X search and code execution $5 per 1,000 calls, attachment search $10, collections search $2.50.
Every xAI model we price
The full catalog — including dated snapshots and variants — exactly as Marginal prices incoming usage events.
| Cached input / 1M | ||||
|---|---|---|---|---|
| grok-2 | $2.00 | $10.00 | 128K | — |
| grok-2-1212 | $2.00 | $10.00 | 128K | — |
| grok-2-latest | $2.00 | $10.00 | 128K | — |
| grok-2-vision | $2.00 | $10.00 | 32K | — |
| grok-2-vision-1212 | $2.00 | $10.00 | 32K | — |
| grok-2-vision-latest | $2.00 | $10.00 | 32K | — |
| grok-3 | $3.00 | $15.00 | 128K | $0.75 |
| grok-3-beta | $3.00 | $15.00 | 128K | $0.75 |
| grok-3-fast-beta | $5.00 | $25.00 | 128K | $1.25 |
| grok-3-fast-latest | $5.00 | $25.00 | 128K | $1.25 |
| grok-3-latest | $3.00 | $15.00 | 128K | $0.75 |
| grok-3-mini | $0.30 | $0.50 | 128K | $0.075 |
| grok-3-mini-beta | $0.30 | $0.50 | 128K | $0.075 |
| grok-3-mini-fast | $0.60 | $4.00 | 128K | $0.15 |
| grok-3-mini-fast-beta | $0.60 | $4.00 | 128K | $0.15 |
| grok-3-mini-fast-latest | $0.60 | $4.00 | 128K | $0.15 |
| grok-3-mini-latest | $0.30 | $0.50 | 128K | $0.075 |
| grok-4 | $3.00 | $15.00 | 250K | — |
| grok-4-0709 | $3.00 | $15.00 | 250K | — |
| grok-4-1-fast | $0.20 | $0.50 | 2M | $0.05 |
| grok-4-1-fast-non-reasoning | $0.20 | $0.50 | 2M | $0.05 |
| grok-4-1-fast-non-reasoning-latest | $0.20 | $0.50 | 2M | $0.05 |
| grok-4-1-fast-reasoning | $0.20 | $0.50 | 2M | $0.05 |
| grok-4-1-fast-reasoning-latest | $0.20 | $0.50 | 2M | $0.05 |
| grok-4-fast-non-reasoning | $0.20 | $0.50 | 2M | $0.05 |
| grok-4-fast-reasoning | $0.20 | $0.50 | 2M | $0.05 |
| grok-4-latest | $3.00 | $15.00 | 250K | — |
| grok-4.20-0309-non-reasoning | $1.25 | $2.50 | 1M | $0.20 |
| grok-4.20-0309-reasoning | $1.25 | $2.50 | 1M | $0.20 |
| grok-4.20-beta-0309-non-reasoning | $1.25 | $2.50 | 1M | $0.20 |
| grok-4.20-beta-0309-reasoning | $1.25 | $2.50 | 1M | $0.20 |
| grok-4.20-multi-agent-0309 | $1.25 | $2.50 | 1M | $0.20 |
| grok-4.20-multi-agent-beta-0309 | $1.25 | $2.50 | 1M | $0.20 |
| grok-4.3 | $1.25 | $2.50 | 1M | $0.20 |
| grok-4.3-latest | $1.25 | $2.50 | 1M | $0.20 |
| grok-4.5 | $2.00 | $6.00 | 500K | $0.30 |
| grok-4.5-latest | $2.00 | $6.00 | 500K | $0.30 |
| grok-4.6 | $2.00 | $6.00 | 500K | $0.50 |
| grok-beta | $5.00 | $15.00 | 128K | — |
| grok-build-0.1 | $1.00 | $2.00 | 250K | $0.20 |
| grok-code-fast | $1.00 | $2.00 | 250K | $0.20 |
| grok-code-fast-1 | $1.00 | $2.00 | 250K | $0.20 |
| grok-code-fast-1-0825 | $1.00 | $2.00 | 250K | $0.20 |
| grok-vision-beta | $5.00 | $15.00 | 8K | — |
Prices last synced Aug 20, 2026 from the LiteLLM community price catalog — the same catalog Marginal prices real usage events against, refreshed daily. Spot an error? Tell us.
Other providers
Using xAI in production?
Marginal prices every call your app makes against this catalog and slices spend by customer, feature, or any field you define. One track() call to integrate.