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.
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...
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
Pythonfrom 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
| Benchmark | Score | Notes |
|---|---|---|
| CursorBench 4.0 | 46.3% (xhigh effort) | Multi-hour IDE coding tasks. +5.9% vs Grok 4.6 (high effort) |
| DeepSWE v1.1 | 71.0% | Software engineering evaluation. +5.8% vs Grok 4.6 |
| EEBench | 64.0% | Electrical engineering. +11.0% vs Grok 4.6 |
| Harvey Legal Agent Benchmark | 19.6% | Legal task performance. +3.8% vs Grok 4.6 |
| AA Briefcase v1.1 | 1657 Elo | Professional office work across law, nursing, finance. +111 vs Grok 4.6 |
| Terminal Bench 4.0 | 38.0% (xhigh) | CLI-based tasks. +17.7% vs Grok 4.6 |
| LatchBio Biosafety | 62.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 →