xAI Grok API Pricing
Compare xAI Grok API pricing across 7 models, from $0.20/1M input on Grok 4.1 Fast to $3.00/1M input on Grok 4. Grok 4.3 and Grok 4.20 handle heavier reasoning, Grok Code Fast 1 is the low-cost coding lane, and Grok 4.1 Fast gives you a 2,000,000-token context window.
xAI Recommendation
Start with Grok 4.1 Fast at $0.20/1M input for cheap long-context chat and document work, move to Grok Code Fast 1 at $0.20/1M input for coding, and reserve Grok 4.3 or Grok 4.20 when the task needs heavier reasoning.
Compare xAI vs other providers
xAI Models & Pricing
| Model | Input Price | Output Price | Context Window | Max Output | Category | Capabilities |
|---|---|---|---|---|---|---|
Grok 4.3 xAI reasoning model with 1M context, vision input, and low baseline token pricing. Released: 4/30/2026 | $1.25 per 1M tokens | $2.50 per 1M tokens | 1,000,000 tokens | 131,072 tokens | reasoning | textvisionreasoning |
$1.25 per 1M tokens | $2.50 per 1M tokens | 2,000,000 tokens | 131,072 tokens | reasoning | textvisionreasoningcode | |
Grok Code Fast 1 xAI's specialized fast coding model with reasoning, optimized for code generation and debugging Released: 2/1/2026 | $0.20 per 1M tokens | $1.50 per 1M tokens | 256,000 tokens | 32,768 tokens | standard | textcodereasoning |
$0.20 per 1M tokens | $0.50 per 1M tokens | 2,000,000 tokens | 131,072 tokens | efficient | textreasoningcode | |
$3.00 per 1M tokens | $15.00 per 1M tokens | 256,000 tokens | 131,072 tokens | reasoning | textvisionreasoningcode | |
$3.00 per 1M tokens | $15.00 per 1M tokens | 131,072 tokens | 131,072 tokens | flagship | textvisionreasoningcode | |
$0.30 per 1M tokens | $0.50 per 1M tokens | 128,000 tokens | 131,072 tokens | efficient | textreasoningcode |
Calculate xAI Costs
Use our calculator to estimate costs for any xAI model based on your usage patterns.
Compare xAI Models
Grok 4.3 vs Grok 4.20
Grok 4.20 vs Grok 4
Grok Code Fast 1 vs Grok 4.1 Fast
Grok 4.1 Fast vs Grok 3 Mini
Grok 4 vs Grok 3
Grok 3 vs Grok 3 Mini
xAI Pricing FAQ
How much does the xAI Grok API cost?
xAI Grok pricing on this page starts with Grok 4.1 Fast at $0.20 per million input tokens. Grok Code Fast 1 costs $0.20 input and $1.50 output, Grok 4.3 costs $1.25 input and $2.50 output, and Grok 4.20 costs $1.25 input and $2.50 output.
What is the cheapest Grok model?
Grok 4.1 Fast is the cheapest current Grok model at $0.20 per million input tokens. It also gives you a 2,000,000-token context window, which makes it the default pick for long-context budget workloads.
Which Grok model is best for coding?
Grok Code Fast 1 is the cleanest low-cost coding option at $0.20/1M input and $1.50/1M output. If you need deeper reasoning on top of code generation, step up to Grok 4.20 or Grok 4.3.
What Grok models does xAI offer?
xAI currently offers 7 Grok models on this page: Grok 4.3, Grok 4.20, Grok 4, Grok 4.1 Fast, Grok Code Fast 1, Grok 3, Grok 3 Mini. The lineup covers efficient, reasoning, and flagship tiers, with context windows up to 2000K tokens.
How does xAI Grok pricing compare to OpenAI and Anthropic?
xAI starts at $0.20/1M input with Grok 4.1 Fast and reaches $3.00/1M input on its premium Grok models. That puts xAI between the cheapest OpenAI mini tiers and the more expensive Anthropic flagship tiers, with Grok Code Fast 1 and Grok 4.20 covering coding and reasoning niches.
Related Articles
2 Million Token Context Windows: o4-mini vs Grok 4.20 vs Gemini 3 Pro Cost Comparison
Three AI models now offer 2 million token context windows, but costs vary by 15x. We compare o4-mini, Grok 4.20, and...
3/28/2026
xAI Grok Pricing Guide 2026: Grok 4.20, 4.3, 4.1 Fast & More
See xAI Grok API pricing for Grok 4.20, Grok 4.3, Grok 4, Grok 4.1 Fast, Grok Code Fast 1, and legacy Grok models. Ex...
2/27/2026
Grok 4 vs GPT-5: xAI's Challenger Priced Against OpenAI
A detailed cost comparison between xAI's Grok 4 and OpenAI's GPT-5, covering per-token pricing, context windows, and...
2/21/2026