Skip to main content

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.

7Models
$0.20Starting from
Try xAI
$0.20
Cheapest Input Price
Grok 4.1 Fast
$1.314286
Average Input Price
per 1M tokens
$3.00
Most Expensive
Grok 4

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.

xAI Models & Pricing

ModelInput PriceOutput PriceContext WindowMax OutputCategoryCapabilities
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
Grok 4.20
xAI's most advanced multi-agent reasoning model with 2M context
Released: 2/17/2026
$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
Grok 4.1 Fast
Fast and affordable reasoning model with 2M context window
Released: 1/15/2026
$0.20
per 1M tokens
$0.50
per 1M tokens
2,000,000
tokens
131,072
tokens
efficient
textreasoningcode
Grok 4
Most advanced reasoning model from xAI with exceptional problem-solving
Released: 7/9/2025
$3.00
per 1M tokens
$15.00
per 1M tokens
256,000
tokens
131,072
tokens
reasoning
textvisionreasoningcode
Grok 3
Flagship reasoning model from xAI
Released: 2/17/2025
$3.00
per 1M tokens
$15.00
per 1M tokens
131,072
tokens
131,072
tokens
flagship
textvisionreasoningcode
Grok 3 Mini
Fast and affordable reasoning model from xAI
Released: 2/17/2025
$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

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.

About xAI

Elon Musk-founded AI company building Grok models