Sponsored
LimitDigest

xAI API pricing

Every xAI model we track, per 1M tokens, from the official pricing page.

Quick answer: xAI API prices run from $1 in and $2 out per 1M tokens (Grok Build 0.1) up to $2 in and $6 out (Grok 4.7). Its cheapest model is number 9 of 29 on our full list. Checked Oct 16, 2026 against the official pricing page.
ModelInputCachedOutputContext
Grok Build 0.1grok-build-0.1Prompts under 200K.$1$0.20$2256K
Grok 4.3grok-4.3Prompts under 200K. Longer prompts cost double.$1.25$0.20$2.501M
Grok 4.7grok-4.7Prompts under 200K. Longer prompts cost $4 in, $12 out.$2$0.50$6500K
Grok Build 0.1grok-build-0.1
256K context
$1Input
$2Output
$0.20Cached
Prompts under 200K.
Grok 4.3grok-4.3
1M context
$1.25Input
$2.50Output
$0.20Cached
Prompts under 200K. Longer prompts cost double.
Grok 4.7grok-4.7
500K context
$2Input
$6Output
$0.50Cached
Prompts under 200K. Longer prompts cost $4 in, $12 out.

How it compares

Cheapest models from other providers, blended per 1M tokens: GPT-6 Luna (OpenAI) $0.20 · Qwen3.8 Flash (Qwen) $0.23 · Mistral Small 4 (Mistral) $0.26. See the full API price table, the best model for each task or the plan vs API calculator.

FAQ

How much does the xAI API cost?

From $1 input and $2 output per 1M tokens for Grok Build 0.1, up to $2 and $6 for Grok 4.7.

What is the cheapest xAI model?

Grok Build 0.1, with a blended price of $1.25 per 1M tokens (3 parts input to 1 part output).

Is a subscription cheaper than the xAI API?

It depends on how much you use it. Try our plan vs API calculator with your own usage.

Other providers: OpenAI · Anthropic · Google · Meta · DeepSeek · Qwen · Mistral