Models / xAI / Grok 4.20
xAI

Grok 4.20

BYOKClosedReleased 31 Mar 2026

Closed-weight mid-tier model from xAI with a 1M-token context window. Its standout result is Terminal-Bench, and it sits at the registry median on intelligence.

Read the full description ↓

Spec sheet

Family
xAI
Released
31 Mar 20268 months ago
Weights
Closed
Context window
1M tokens
Largest response
1.8M tokens
Accepts
text, image, file
Supports
tools, reasoning, structured output
Knowledge cutoff
September 2025
Intelligence index
59.5#55
Input price
$1.25 / 1M
Output price
$2.5 / 1M
Blended price (3:1)
$1.56 / 1M
Index points per $
38.1#54
Speed
84 tokens/sec#62
Popularity
#112 of 194by usage
Providers
2

Benchmarks

Score · rank among models tested

The tick on each bar marks the registry median; hover over a bar for the numbers. Sources and how the index is computed: methodology.

Providers and prices

$ per 1M tokens · from genai-prices
ProviderGatewayPydantic AI model stringInputCached inputOutputBlended
xAIBYOKxai:grok-4.20 $1.25$0.2$2.5$1.56
OpenRouterBYOKopenrouter:x-ai/grok-4.20 $1.25$0.2$2.5$1.56

Every provider charges the same. Blended price assumes three input tokens for each output token.

Example code

# /// script
# dependencies = ["pydantic-ai"]
# ///
import os

from pydantic_ai import Agent

os.environ['XAI_API_KEY'] = '...'

agent = Agent('xai:grok-4.20', instructions='Be concise, reply with one sentence.')

result = agent.run_sync('Where does "hello world" come from?')
print(result.output)

Ask Grok 4.20 a question with a Pydantic AI agent and print the answer. Run it with uv run hello.py.

Compare

Grok 4.20vsClaude Sonnet 4.6
Intelligence indexOur composite of the benchmarks below, 0-100
Grok 4.2059.5
Claude Sonnet 4.659.5
GPQA DiamondGraduate-level science questions, multiple choice
Grok 4.2089.3%
Claude Sonnet 4.687.4%
OTIS Mock AIMECompetition mathematics problems with exact answers
Grok 4.2092.2%
Claude Sonnet 4.685.8%
FrontierMathOriginal research-level mathematics problems, tiers 1 to 3
Grok 4.2044.9%
Claude Sonnet 4.6–
ARC-AGI-2Abstract visual puzzles that test learning a new rule from a few examples
Grok 4.2065.1%
Claude Sonnet 4.660.4%
SimpleQA VerifiedShort factual questions answered from memory, without search
Grok 4.2030.2%
Claude Sonnet 4.635.5%
SWE-bench VerifiedReal GitHub issues resolved, run by Epoch with one fixed scaffold
Grok 4.20–
Claude Sonnet 4.675.2%
Terminal-BenchTasks completed in a terminal; the best result of any agent using the model
Grok 4.2057.3%
Claude Sonnet 4.653.4%
SciCodeScientific programming problems written by researchers
Grok 4.20–
Claude Sonnet 4.646.8%
WebDev ArenaRating from human votes on web apps the models built
Grok 4.201373.8
Claude Sonnet 4.61521
APEX-AgentsLong professional tasks (banking, consulting, law) passed on the first attempt
Grok 4.20–
Claude Sonnet 4.643%
LMArena textRating from blind human votes between pairs of chat responses
Grok 4.20–
Claude Sonnet 4.61457.7
Epoch Capabilities IndexEpoch AI's own composite across about 40 benchmarks; shown for comparison, not part of our index
Grok 4.20152.3
Claude Sonnet 4.6152.8
Input pricePer 1M tokens, lower is better
Grok 4.20$1.25
Claude Sonnet 4.6$3
Output pricePer 1M tokens, lower is better
Grok 4.20$2.5
Claude Sonnet 4.6$15
EfficiencyIndex points per blended $
Grok 4.2038
Claude Sonnet 4.610
SpeedOutput tokens per second
Grok 4.2084 t/s
Claude Sonnet 4.654 t/s
Context windowTokens
Grok 4.201M
Claude Sonnet 4.61M
Model stringFor Pydantic AI
Grok 4.20xai:grok-4.20
Claude Sonnet 4.6gateway/anthropic:claude-sonnet-4-6

About Grok 4.20

Description written by an LLM from the data on this page

Closed-weight mid-tier model from xAI with a 1M-token context window. Its standout result is Terminal-Bench, and it sits at the registry median on intelligence.

Grok 4.20 is a closed-weight model from xAI, released March 2026. It offers a 1M-token context window and accepts text, image and file input, with tool calling, reasoning mode and structured output. Its standout result is Terminal-Bench, where it scores 57.3%, 11th of 35 and well above the median. It also ranks 31st of 68 on ARC-AGI-2.

Its overall profile is middling. The intelligence index of 59.5 matches the registry median, and it trails the median on FrontierMath, SimpleQA Verified and WebDev Arena. Blended pricing of $1.56 per million tokens is above the median of about $1.01. It is offered through xAI and OpenRouter, with a knowledge cutoff of September 2025.

Strengths

  • Terminal-Bench 57.3%, 11th of 35, well above the 43.2% median
  • ARC-AGI-2 65.1%, 31st of 68, above the 61.3% median
  • 1M-token context window and 1.8M-token largest response
  • Accepts text, image and file input, with tool calling and structured output

Weaknesses

  • FrontierMath 44.9%, 61st of 80, against a 64.6% median
  • SimpleQA Verified 30.2%, 64th of 76, well below the 46.5% median
  • WebDev Arena rating 1374, 70th of 85, below the 1506 median

Best for

Agentic coding and terminal tasks, long-document work, and tool-using workflows where price is not the main concern.

One key, every model

Pydantic AI Gateway gives you the models marked with a single API key, spending limits and Logfire tracing. Bring your own key for the rest.

Start free  Read the docs