Closed SourcexAI (SpaceXAI)Released 2026-09

Grok 4.7

SpaceXAI's most capable model for coding and knowledge work

Context window

500K

Input / 1M tokens

$2.00

Output / 1M tokens

$6.00

Provider

xAI (SpaceXAI)

Data verified 2026-09-22

Grok 4.7 uses a new, larger base model (2.1 trillion parameters vs Grok 4.6's 1.5T) trained with longer reinforcement learning on multi-hour tasks. The model is better at verifying its own work, managing longer context, and handling extended reasoning. It features improved safeguards and native integration with the Grok Bot harness for conversational and knowledge-work workflows.

Capability index

Relative estimates (0-100) to place this model against its peers, grounded in published benchmarks.

Coding
9
Reasoning
8
Math
7
Multimodal
5
Long context
9
Speed
7
Cost efficiency
8

How to access it

Available through xAI API, Cursor, Grok Build, GitHub Copilot, and third-party model routers. No waitlist required.

Strengths

  • Superior long-horizon coding tasks and extended reasoning
  • Better self-verification and output checking
  • Competitive pricing at same rates as Grok 4.6
  • 500K context window for large codebases and documents
  • Strong performance on professional knowledge work (legal, engineering, office tasks)

Best for developers who...

Multi-hour coding and agentic tasksProfessional knowledge work (legal analysis, engineering, financial analysis)Tasks requiring extended reasoning and self-verificationLarge document processing and codebase understanding

When to choose it (and when not to)

Reach for Grok 4.7 when...

  • Need longest reasoning paths without paying premium rates
  • Working on complex, multi-step coding problems
  • Building agentic workflows that require many iteration steps

Look elsewhere if...

  • If you need multimodal capabilities (limited image support noted in benchmarks)
  • If raw frontier performance is critical—trails Claude Fable 5.1 on some benchmarks

How to use it

  • Use the xhigh reasoning effort for the best performance on difficult tasks, though it increases token usage
  • Leverage the 500K context window for comprehensive task context
  • Use prompt caching (cache_key parameter) to reduce costs on repetitive inputs

Quickstart

Python
from openai import OpenAI
client = OpenAI(api_key="YOUR_XAI_API_KEY", base_url="https://api.x.ai/v1")
response = client.chat.completions.create(model="grok-4.7", messages=[{"role": "user", "content": "Hello"}])
print(response.choices[0].message.content)

Uses OpenAI-compatible SDK. Set base_url to xAI's endpoint.

API model id: grok-4.7

Benchmarks

BenchmarkScoreNotes
CursorBench 4.046.3% (xhigh effort)Multi-hour IDE coding tasks. +5.9% vs Grok 4.6 (high effort)
DeepSWE v1.171.0%Software engineering evaluation. +5.8% vs Grok 4.6
EEBench64.0%Electrical engineering. +11.0% vs Grok 4.6
Harvey Legal Agent Benchmark19.6%Legal task performance. +3.8% vs Grok 4.6
AA Briefcase v1.11657 EloProfessional office work across law, nursing, finance. +111 vs Grok 4.6
Terminal Bench 4.038.0% (xhigh)CLI-based tasks. +17.7% vs Grok 4.6
LatchBio Biosafety62.4%Safety guardrail performance

Source: xAI Official Launch Announcement

Compare Grok 4.7

Compare Grok 4.7 with any other model

Build a comparison →
All model comparisons →

Learn the concepts