xAI API pricing

Grok 4.20 0309 Reasoning API pricing

Grok 4.20 0309 Reasoning costs $1.25 per million input tokens and $2.50 per million output tokens on the xAI API, and $0.20 per million cached input tokens. Context window: 1M tokens. Updated .

Price per 1M tokensUS dollars
Input$1.25
Cached input$0.20
Output$2.50

What it costs in practice

  • One chat or extraction call (2,000 tokens in, 500 out): $0.0037
  • 1,000 such calls: $3.75
  • 1 million tokens at a typical 80% input / 20% output mix: $1.50

Abilities: image input, tool use, reasoning, JSON schema output. Batch, long-context, priority and regional prices differ; check the full table and the provider’s own pricing page before you commit.

Cheapest alternatives from other providers

ModelInputOutputContextTypical call ×1,000
GPT-5 nano
OpenAI
$0.050$0.40272k$0.30
Gemini 2.5 Flash Lite
Google
$0.10$0.401.0M$0.40
Claude Haiku 5.5
Anthropic
$0.10$0.501M$0.45
GPT-6 luna
OpenAI
$0.10$0.50922k$0.45
Qwen3.8 Flash
Alibaba (Qwen)
$0.15$0.47992k$0.54
Qwen3.8 Omni Flash
Alibaba (Qwen)
$0.15$0.47992k$0.54

Other xAI models

ModelInputOutputContextTypical call ×1,000
Grok Build 0.1
xAI
$1.00$2.00256k$3.00
Grok Code Fast
xAI
$1.00$2.00256k$3.00
Grok 4.20
xAI
$1.25$2.501M$3.75
Grok 4.20 0309 Non Reasoning
xAI
$1.25$2.501M$3.75
Grok 4.20 Beta
xAI
$1.25$2.501M$3.75
Grok 4.20 Beta 0309 Non Reasoning
xAI
$1.25$2.501M$3.75

Questions

How much does Grok 4.20 0309 Reasoning cost?

Grok 4.20 0309 Reasoning costs $1.25 per million input tokens and $2.50 per million output tokens on the xAI API; cached input is $0.20 per million. A typical call with 2,000 tokens in and 500 out costs about $0.0037.

What is the context window of Grok 4.20 0309 Reasoning?

Grok 4.20 0309 Reasoning accepts up to 1,000,000 input tokens and returns up to 1,000,000 output tokens.

Is there a cheaper alternative to Grok 4.20 0309 Reasoning?

For a typical call, GPT-5 nano (OpenAI, $0.0003 per call), Gemini 2.5 Flash Lite (Google, $0.0004 per call), Claude Haiku 5.5 (Anthropic, $0.0004 per call) cost less and also support image input, tool use, reasoning, JSON schema output. Quality differs, so test on your own prompts.

Source: the open LiteLLM model price map (MIT), checked daily (data file).