Skip to main content
xAI

Grok 4.7

xAI

xAI model for coding, long-running agents, and knowledge work, with a 500k context window and four reasoning effort levels.

xai/grok-4.7

Documentation

Conversation

xAI

Start a conversation

xAI model for coding, long-running agents, and knowledge work, with a 500k context window and four reasoning effort levels.

Enter to send · Shift+Enter for a new line

Uses POST /v1/chat/completions with your Unifically API key. Supports system and user prompts, tools, streaming, and thinking when available.

What is Grok 4.7?

Grok 4.7 is xAI's top language model, released September 21, 2026 for coding, long-running agents, and knowledge work. It accepts text and image input, outputs text, and runs on Unifically as xai/grok-4.7. The context window is 500k tokens, the knowledge cutoff is May 2026, and reasoning effort is tunable across four levels: low, medium, high (the default), and xhigh. Unlike Grok 4.6, which was Grok 4.5 trained further, Grok 4.7 sits on a new, larger base model with a longer reinforcement learning run weighted toward tasks that take hours.

What's new in Grok 4.7

Opus-level CursorBench 4.0 score at half the cost

46.3% on CursorBench 4.0 at Extra High effort, next to Claude Opus 5 Max at 46.6% and ahead of GPT-5.6 Sol Max at 41.7%. Cursor's board puts the average cost at $6.01 per task against $11.95 for Opus 5 Max. Claude Fable 5.1 Max still leads at 51.8%, at $17.28 per task.

Top five on agentic legal work

Vals AI ranks it fifth of 63 models on Harvey's Legal Agent Benchmark at 19.58%, up from 15.8% for Grok 4.6, and fifth of 37 on Public Benefits Bench at 68.54%. These are multi-step tasks over real case files, not quiz questions.

Built for tasks that run for hours

A new, larger base model and a longer reinforcement learning run on harder, many-hour problems. It checks its own work more often and manages long context better, which shows on Terminal-Bench 2.1: 76.03% on Vals AI, 14th of 67.

A small step up in general intelligence

Artificial Analysis scores it 46 on Intelligence Index v4.3.2, 16th of 655 models, against 44 for Grok 4.6. Claude Fable 5.1 and GPT-6 Astra lead that board at 53.

Four reasoning efforts on one model

low, medium, high, and xhigh trade speed and token spend against depth per request. On CursorBench 4.0 that is 33.1% at $1.58 per task at low and 46.3% at $6.01 at xhigh.

Best for

Editor coding agents

46.3% on CursorBench 4.0 at roughly half the per-task cost of the models around it.

Long-running agents

Trained on many-hour tasks; verifies its own work across long chains of steps.

Legal and public-sector work

Fifth on Harvey's Legal Agent Benchmark and on Public Benefits Bench in Vals AI's runs.

Documents and presentations

Stronger than Grok 4.6 at office deliverables, with structured outputs and function calling.

Visual input tasks

Screenshots, diagrams, and charts read as input for text answers.

Hard problems at xhigh effort

When answer quality matters more than the wait, xhigh buys extra reasoning.

Use cases

Use Grok 4.7 behind coding agents that take a real issue from report to green tests: read the repo, patch, run, and try again. It fits legal and compliance assistants that read case files, apply rules, and return structured JSON through function calling. Office agents that draft reports, spreadsheets, and slide decks are a stated training focus. With 500k tokens of context, long contracts, design docs, and issue threads fit in one request, with screenshots included as image input.

Limitations

Grok 4.7 is slow and wordy on long tasks. Artificial Analysis counted 240M output tokens across its Intelligence Index run against a 92M median, and Vals AI measured about 27 minutes per test on the Vals Index. Token spend climbs on the longest agent runs: Vals AI logged $12.73 per test on Terminal-Bench 4.0, where it scored 12.12%, 16th of 29.

It is not a clean win over Grok 4.6 everywhere. On the Vals Index it scores 54.15%, 24th of 59, behind Grok 4.6 at 59.17%. Competition math and programming are weak spots: 39.39% on IOI and 34.00% on ProofBench v1.1.

The 500k context window is half the 1M tokens Grok 4.3 takes, which matters for the largest single-request workloads. Output is text only, and image generation is a separate Grok Imagine family.

Grok 4.7 vs Grok 4.6

Grok 4.7 is a new, larger base model, where Grok 4.6 was Grok 4.5 trained further. The gains are in long agent work: CursorBench 4.0 rises from 40.4% to 46.3%, Harvey's Legal Agent Benchmark from 15.8% to 19.6%, and the Artificial Analysis Intelligence Index from 44 to 46. The broad Vals Index goes the other way, 54.15% against 59.17%. Input and output tokens cost the same on both. Move coding-agent, legal, and office traffic to 4.7, and keep Grok 4.6 where your prompts are already tuned and scoring well.

When to use Grok 4.7

Use Grok 4.7 when the task is long and the finish line matters: multi-hour coding runs, case-file review, report and deck building, and tool-calling workflows that punish shallow answers. Skip it when you need fast first tokens or the cheapest possible bulk calls.

API examples

Call Grok 4.7 from any language by POSTing to /v1/chat/completions, the OpenAI-compatible endpoint shared by every language model on the platform. Full parameter docs live at docs.unifically.com/models/llm/xai/grok-4.7.

curl -X POST https://api.unifically.com/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "model": "xai/grok-4.7",
    "messages": [
      { "role": "user", "content": "Read this service agreement and list every clause that shifts liability to the customer." }
    ]
  }'

The response comes back synchronously with the completion. Set "stream": true to receive tokens as they generate.

FAQs

People also ask

xai/grok-4.7, called through the OpenAI-compatible POST /v1/chat/completions endpoint with your Unifically API key. The same model ID also works on /v1/responses and /v1/messages.

Text and image input, text output. The context window is 500k tokens, and function calling, structured outputs, and streaming all work through the standard chat completions request.

For coding agents and long tasks, yes. CursorBench 4.0 rises from 40.4% to 46.3%, and Artificial Analysis scores it 46 on the Intelligence Index against 44 for Grok 4.6. On the broader Vals Index it scores 54.15% against 59.17% for Grok 4.6, so test it on your own workload before moving everything over.

46.3% on CursorBench 4.0 at Extra High effort, level with Claude Opus 5 Max at 46.6% and ahead of GPT-5.6 Sol Max at 41.7%, at an average cost of $6.01 per task on Cursor's board. Vals AI also measures 76.03% on Terminal-Bench 2.1, 14th of 67 models.

Four levels, low, medium, high, and xhigh, with high as the default. On CursorBench 4.0 the score climbs from 33.1% at low to 46.3% at xhigh, and the cost per task climbs with it, so pick the effort per request.

It is one of the strongest models measured so far. Vals AI ranks it fifth of 63 on Harvey's Legal Agent Benchmark at 19.58%, and fifth of 37 on Public Benefits Bench at 68.54%.

Not on long tasks. It thinks at length and writes a lot. Artificial Analysis counted 240M output tokens across its Intelligence Index run against a 92M median, and Vals AI measured about 27 minutes per test on its index. Pick it for depth, not for instant chat replies.