xAI: Grok 4 API Pricing

by x-ai · 256K context window ·

$3.000
Input /1M tokens
$15.000
Output /1M tokens
256K
Context window

Monthly Cost Examples

Assuming 50% input / 50% output token split

UsageMonthly cost
100K tokens/month$0.90
1M tokens/month$9.00
10M tokens/month$90.00
100M tokens/month$900.00

Compare with other models

xAI: Grok 4 vs OpenAI: GPT-4o →xAI: Grok 4 vs OpenAI: GPT-4o-mini →xAI: Grok 4 vs OpenAI: o1 →

Automate your model selection

StormRouter sends each request to the cheapest model that can handle it.
Only use xAI: Grok 4 when your quality requirements demand it.

Try StormRouter free →

Similar models

xAI: Grok 4.1 Fast$0.700/1MxAI: Grok 4 Fast$0.700/1MxAI: Grok 3 Mini$0.800/1MxAI: Grok 3 Mini Beta$0.800/1MxAI: Grok Code Fast 1$1.700/1MOpenAI: o4 Mini Deep Research$10.000/1M