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 42 of 90 on our full list. Checked Nov 30, 2026 against the official pricing page.

xAI's Grok models: 3 are priced here, from $1 in and $2 out per 1M tokens (Grok Build 0.1) to $2 in and $6 out (Grok 4.7). Each model name below opens its own page with workload costs, LMArena ranks and cheaper alternatives.

ModelInputCachedOutputContext
Grok Build 0.1grok-build-0.1Prompts under 200K; longer prompts cost double. Missing from xAI's docs again since Nov 24, 2026 (model page redirects to the models list; the grok-build-latest alias now points to Grok 4.5). Last listed price shown.$1$0.20$2500K
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
500K context
$1Input
$2Output
$0.20Cached
Prompts under 200K; longer prompts cost double. Missing from xAI's docs again since Nov 24, 2026 (model page redirects to the models list; the grok-build-latest alias now points to Grok 4.5). Last listed price shown.
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.

Which xAI model should you pick?

  • Cheapest: Grok Build 0.1 at $1 in and $2 out, number 42 of 90 on our full price list.
  • Best on LMArena: Grok 4.7, #24 of 58 priced models on Code Arena, at $2 in and $6 out.
  • Flagship: Grok 4.7 at $2 in and $6 out.
  • Biggest context: Grok 4.3 with 1M tokens.

How it compares

Cheapest models from other providers, blended per 1M tokens: Qwen3.7 Flash (Qwen) $0.06 · Hunyuan Hy4 Flash (Tencent Hunyuan) $0.12 · Step 3.5 Flash (StepFun) $0.15. See the full API price table, the best model for each task or the plan vs API calculator.

Need the long-prompt, batch, tool and rate limit details? See Grok API pricing explained.

Looking for the lowest price per token? See the cheapest LLM API ranking.

Head-to-head comparisons

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.

Which xAI model is the best?

By LMArena rank among the models we price, Grok 4.7 ranks highest at #24 on Code Arena.

Does the xAI API have cheaper cached input?

Yes, for 3 of 3 models: cached input is listed at $0.20 to $0.50 per 1M tokens.

How does xAI compare with other models?

We have head-to-head pages for Claude Fable 5.2 vs Grok 4.7, Grok 4.7 vs GPT-6.1 Sol, Grok 4.7 vs Claude Opus 5.5 and 4 more.

Other providers: OpenAI · Anthropic · Google · Meta · DeepSeek · Qwen · Mistral · Kimi · GLM (Z.ai) · MiniMax · ByteDance Seed · Tencent Hunyuan · Baidu ERNIE · StepFun · Xiaomi MiMo · Meituan LongCat