Models / xAI / Grok 4.7
xAI

Grok 4.7

BYOKClosedReleased 21 Sept 2026

A closed, mid-priced reasoning model from xAI with a 500k context window, released September 2026. Its standout results are agentic work and some math, with weaker showings on research-level maths and chat ratings.

Read the full description ↓

Spec sheet

Family
xAI
Released
21 Sept 20262 months ago
Weights
Closed
Context window
500k tokens
Largest response
500k tokens
Accepts
text, image, file
Supports
tools, reasoning, structured output
Knowledge cutoff
May 2026
Intelligence index
68#29
Input price
$2 / 1M
Output price
$6 / 1M
Blended price (3:1)
$3 / 1M
Index points per $
22.7#73
Speed
73 tokens/sec#79
Popularity
#43 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.7 $2$0.5$6$3
OpenRouterBYOKopenrouter:x-ai/grok-4.7 $2$0.5$6$3

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.7', instructions='Be concise, reply with one sentence.')

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

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

Compare

Grok 4.7vsGPT-5.4
Intelligence index
205590$0.1$1$10GPT-5.4: 67.9 at $5.63 blendedGrok 4.7: 68 at $3 blended
GPQA Diamond
5075100$0.1$1$10GPT-5.4: 93.3% at $5.63 blendedGrok 4.7: 92.7% at $3 blended
OTIS Mock AIME
4070100$0.1$1$10GPT-5.4: 97.8% at $5.63 blendedGrok 4.7: 98.1% at $3 blended
FrontierMath
1055100$0.1$1$10GPT-5.4: 78.6% at $5.63 blendedGrok 4.7: 53% at $3 blended
ARC-AGI-2
050100$0.1$1$10GPT-5.4: 74% at $5.63 blendedGrok 4.7: 61.4% at $3 blended
SimpleQA Verified
1055100$0.1$1$10GPT-5.4: 45.1% at $5.63 blendedGrok 4.7: 56% at $3 blended
SWE-bench Verified
507090$0.1$1$10GPT-5.4: 76.9% at $5.63 blended
Terminal-Bench
04590$0.1$1$10GPT-5.4: 81.8% at $5.63 blended
SciCode
204570$0.1$1$10GPT-5.4: 56.6% at $5.63 blendedGrok 4.7: 57.8% at $3 blended
WebDev Arena
122015251830$0.1$1$10GPT-5.4: 1463 at $5.63 blendedGrok 4.7: 1637.5 at $3 blended
APEX-Agents
04590$0.1$1$10GPT-5.4: 52.4% at $5.63 blendedGrok 4.7: 70% at $3 blended
LMArena text
128014101540$0.1$1$10GPT-5.4: 1468.8 at $5.63 blendedGrok 4.7: 1400.6 at $3 blended
Epoch Capabilities Index
120150180$0.1$1$10GPT-5.4: 157.9 at $5.63 blendedGrok 4.7: 156.4 at $3 blended

Score against blended price per 1M tokens (log scale). Grok 4.7   GPT-5.4   other models

Intelligence indexOur composite of the benchmarks below, 0-100
Grok 4.768
GPT-5.467.9
GPQA DiamondGraduate-level science questions, multiple choice
Grok 4.792.7%
GPT-5.493.3%
OTIS Mock AIMECompetition mathematics problems with exact answers
Grok 4.798.1%
GPT-5.497.8%
FrontierMathOriginal research-level mathematics problems, tiers 1 to 3
Grok 4.753%
GPT-5.478.6%
ARC-AGI-2Abstract visual puzzles that test learning a new rule from a few examples
Grok 4.761.4%
GPT-5.474%
SimpleQA VerifiedShort factual questions answered from memory, without search
Grok 4.756%
GPT-5.445.1%
SWE-bench VerifiedReal GitHub issues resolved, run by Epoch with one fixed scaffold
Grok 4.7–
GPT-5.476.9%
Terminal-BenchTasks completed in a terminal; the best result of any agent using the model
Grok 4.7–
GPT-5.481.8%
SciCodeScientific programming problems written by researchers
Grok 4.757.8%
GPT-5.456.6%
WebDev ArenaRating from human votes on web apps the models built
Grok 4.71637.5
GPT-5.41463
APEX-AgentsLong professional tasks (banking, consulting, law) passed on the first attempt
Grok 4.770%
GPT-5.452.4%
LMArena textRating from blind human votes between pairs of chat responses
Grok 4.71400.6
GPT-5.41468.8
Epoch Capabilities IndexEpoch AI's own composite across about 40 benchmarks; shown for comparison, not part of our index
Grok 4.7156.4
GPT-5.4157.9
Input pricePer 1M tokens, lower is better
Grok 4.7$2
GPT-5.4$2.5
Output pricePer 1M tokens, lower is better
Grok 4.7$6
GPT-5.4$15
EfficiencyIndex points per blended $
Grok 4.723
GPT-5.412
SpeedOutput tokens per second
Grok 4.773 t/s
GPT-5.459 t/s
Context windowTokens
Grok 4.7500k
GPT-5.41.1M
Model stringFor Pydantic AI
Grok 4.7xai:grok-4.7
GPT-5.4gateway/openai:gpt-5.4

About Grok 4.7

Description written by an LLM from the data on this page

A closed, mid-priced reasoning model from xAI with a 500k context window, released September 2026. Its standout results are agentic work and some math, with weaker showings on research-level maths and chat ratings.

Grok 4.7 is a closed-weights model from xAI, released in September 2026, with text, image and file input, tool calling, structured output and a reasoning mode. Its 500k context window and 500k maximum response length are large for the registry, and it is offered through xAI and OpenRouter.

The strongest results are on agent-style tasks. It ranks 9th of 60 on APEX-Agents, where it passes long professional tasks on the first attempt 70.0% of the time against a median of 54.3%. It also places 12th of 85 on WebDev Arena and 17th of 96 on SciCode, and sits above the median on SimpleQA Verified and GPQA Diamond.

Its weaknesses are in research-level mathematics and in human preference ratings. FrontierMath is 55th of 80 at 53.0%, below the median, and its LMArena text rating ranks 92nd of 114. At $2 per million input tokens and $6 per million output tokens, it costs roughly three times the registry median blended price.

Strengths

  • APEX-Agents 70.0%, 9th of 60
  • OTIS Mock AIME 98.1%, 31st of 95 but above median 94.2%
  • SimpleQA Verified 56.0%, 26th of 76 against median 46.5%
  • WebDev Arena 1637.5, 12th of 85

Weaknesses

  • FrontierMath 53.0%, 55th of 80, below median 64.6%
  • LMArena text 1400.6, 92nd of 114
  • Blended price $3 per million tokens, above median $1.01

Best for

Agent workloads that need tool calling, structured output and long context, such as professional tasks and web app generation.

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