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

API prices per million tokens
Cached input
Grok 4.1 Fast$0.20$0.50$0.05$0.28128K41.4
Grok Build 0.1$1$2$0.20$1.25256K36.4
Grok 4.20 (Non-Reasoning)$1.25$2.50$0.20$1.561M48.6
Grok 4.20 Multi-Agent$1.25$2.50$0.20$1.561M46.2
Grok 4.3$1.25$2.50$0.20$1.561M43.8
Grok 4.5$2$6$0.30$3500K55.0
Grok 4.6$2$6$0.50$3500K56.9
Grok 4.7$2$6$0.50$3500K53.1

Prices on other platforms

The same models are often sold through clouds and resellers at different rates.

ModelRouteInputOutputChecked
Grok 4.6azure$2$62026-10-10
bedrock$2$62026-10-10
openrouter$2$62026-10-10
vertex$2$62026-10-10
xai$2$62026-10-10
Grok 4.5openrouter$2$62026-10-10
xai$2$62026-10-10
Grok 4.7bedrock$2$62026-10-10
openrouter$2$62026-10-10
vertex$2$62026-10-10
xai$2$62026-10-10
Grok 4.20 (Non-Reasoning)azure$2$62026-10-10
openrouter$1.25$2.502026-10-10
vertex$1.25$2.502026-10-10
xai$1.25$2.502026-10-10
Grok 4.20 Multi-Agentopenrouter$1.25$2.502026-10-10
xai$1.25$2.502026-10-10
Grok 4.3bedrock$1.25$2.502026-10-10
openrouter$1.25$2.502026-10-10
vertex$1.25$2.502026-10-10
xai$1.25$2.502026-10-10
Grok 4.1 Fastazure$0.20$0.502026-10-10
vertex$0.20$0.502026-10-10
Grok Build 0.1openrouter$1$22026-10-10
xai$1$22026-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.