Grok 4.7 API
XAI's bigger model for long agents and knowledge work
A new, larger base model and a longer training run on multi-hour tasks nearly double Grok 4.6's Terminal-Bench score with the same 500,000-token window, though it spends far more tokens to get there.
- Kind: chat
- Made by: xAI (SpaceXAI)
- Price: 160 credits / M input tokens, 480 / M output (from $1.60; 1 credit = $0.01 on monthly plans, $0.015 as a top-up)
- Released: 2026-09-21
- Open weights: no (Proprietary, closed weights; available through xAI's API, Grok Build, Cursor and API resellers under xAI's terms)
- Context window: 500,000 tokens
- Inputs: Text and images
- Output: Text only
- Reasoning effort: low, medium, high (default), xhigh
- Knowledge cutoff: May 2026
- Parameters: About 2.1 trillion per Elon Musk; not in xAI's docs
- Licence: Proprietary, API only
- Inputs: model, messages, tools, tool_choice, stream, max_tokens, temperature, top_p, stop, response_format, reasoning_effort
Call it with POST https://api.unicornapi.net/v1/chat/completions and model grok-4-7, or try it in the Playground.
Where it shines
- Terminal-Bench 4.0 rises from 20.3% to 37.6% on xAI's launch table
- Leads xAI's comparison on EEBench (64.0%) and the Harvey legal-agent test (19.6%)
- AA-Briefcase office work up 111 Elo to 1657, close to Claude Fable 5.1
- Hallucination rate down from 34% to 29% on AA-Omniscience
- Larger base model, about 2.1 trillion parameters per Musk, with the same 500,000-token window
Watch out for
- About 81,000 output tokens per task at xhigh, against 36,000 for Grok 4.6
- Trails Claude Fable 5.1 by about 20 points on Terminal-Bench and 5.5 on CursorBench
- Front-end, 3D and visual tasks drew criticism from early testers
- Not intended for autonomous high-stakes use in medicine, law or finance
Grok 4.7 is the new flagship language model from xAI, the Elon Musk-founded lab that now works inside SpaceX under the SpaceXAI name. xAI calls it its "most powerful model for coding and knowledge work" and ships it on September 21, 2026, about six weeks after Grok 4.6, with the same 500,000-token context window and the same four reasoning effort levels.
What changes is underneath. Grok 4.7 sits on a new and larger base model, and xAI gave it a longer round of reinforcement learning on tasks that take hours to finish. The result shows most clearly in long agent work: on Terminal-Bench 4.0, where a model has to get real jobs done in a command line, xAI reports 37.6%, up from 20.3% for Grok 4.6. Office work, engineering and legal tasks rise too.
The release also arrives with a lot of expectation attached. Musk spent September promising, then postponing, and finally lowering the bar. The model that ships is a clear step up from its predecessor, but it does not take the top spot, and it pays for its gains with many more tokens per task. Decrypt summed it up as "bigger, but late to the frontier party".
xAI's larger base model, closed and API-first
xAI built the Grok series from Grok-1 to the Grok 4 family that has updated roughly monthly through the summer of 2026: Grok 4.5 in July, Grok 4.6 on August 12, and now Grok 4.7. SpaceX acquired xAI in February 2026 and the lab has since rebranded as SpaceXAI, but the Grok name, the apps and the developer API stay as they were.
Grok 4.7 is closed. xAI has published weights for older models, Grok-1 under Apache 2.0 and Grok 2.5 under its own community licence, but nothing from Grok 3 onward, and Grok 4.7 is reachable only as a hosted model. On xAI's API it is grok-4.7, and on launch day it also goes live in Cursor, in Grok Build, xAI's coding tool, where it becomes the default model, and through model routers such as OpenRouter, Vercel and Cloudflare.
The run-up was bumpy. In early September Musk said the model would land in about ten days and beat every other model. When that date came, he said it needed more time because it stopped hard tasks too early and did not check its own work, and he set expectations at "roughly on par with" Claude Opus 5, not the newer Opus 5.1. Musk has also said the base model has about 2.1 trillion parameters, against 1.5 trillion for Grok 4.6. xAI's launch post says only that the base model is larger, and the company has not published an architecture.
What changed from Grok 4.6
xAI's launch table puts Grok 4.7 next to its predecessor and two rivals, OpenAI's GPT-5.6 Sol and Anthropic's Claude Fable 5.1:
| Benchmark | Grok 4.7 | Grok 4.6 | GPT-5.6 Sol | Fable 5.1 |
|---|---|---|---|---|
| CursorBench 4.0 (coding) | 46.3% | 40.4% | 41.7% | 51.8% |
| DeepSWE v1.1 (coding) | 71.0% | 65.2% | 72.7% | 70.0% |
| EEBench (electrical engineering) | 64.0% | 53.0% | 39.4% | 56.4% |
| AA-Briefcase v1.1 (office work, Elo) | 1657 | 1546 | 1487 | 1678 |
| Terminal-Bench 4.0 (terminal work) | 37.6% | 20.3% | 37.3% | 57.9% |
| Harvey Legal Agent | 19.6% | 15.8% | 2.5% | 6.7% |
| HealthBench Professional | 56.7% | 48.5% | 60.5% | 62.1% |
xAI marks its DeepSWE score as run at high effort rather than the top xhigh setting.
Long agent tasks. The Terminal-Bench result nearly doubles, the biggest single jump in the table. Artificial Analysis, testing Grok 4.7 inside Grok Build on launch day, measured a smaller but real rise on the same test, from 18% to 33%, and its Coding Agent Index score for the pair rose from 47 to 56. In the same testing DeepSWE climbed from 65% to 73% and SWE-Atlas-QnA from 58% to 63%.
Professional work. AA-Briefcase grades multi-hour office deliverables such as reports and spreadsheets; Grok 4.7 gains 111 Elo points and lands within 21 points of Fable 5.1. On EEBench and the Harvey legal-agent test it leads every model in xAI's table.
Checking its work. xAI says the model is "better at verifying its own work and managing longer context", which answers the two problems Musk named during the delay.
Facts. On Artificial Analysis' AA-Omniscience test the hallucination rate falls from 34% to 29%, while accuracy holds about level at 47%.
Safety. Grok 4.7 ships with what xAI calls "an entirely new safeguard stack". On HackerBench v0.3 it lets 3.3% of risky dual-use prompts through, and xAI is giving select cybersecurity partners invite-only access to the model's red-team abilities.
Unchanged. The 500,000-token window, text-and-image input and the four effort levels all carry over from Grok 4.6.
How xAI trained Grok 4.7
xAI describes two changes. The first is the new base model, larger than the one behind Grok 4.6. The second is the reinforcement learning stage, which ran longer and used "a harder mix of tasks, weighted toward problems that take many hours to complete". That is a deliberate bet on agents that keep working through a long job rather than on quick chat answers.
xAI also trained Grok 4.7 to understand the Grok Bot harness natively. Grok Bot is the company's agent product, launched in beta in August, in which bots take on workplace tasks across apps, inboxes and websites and check back only when they need approval. A model that knows its harness wastes fewer steps working out its tools.
Before launch Musk said the training data included SpaceX engineering material such as Starlink telemetry and failure logs. The launch post does not mention it, so treat that as a claim rather than a documented fact.
Grok 4.7 specs
| Grok 4.7 | |
|---|---|
| Maker | xAI (SpaceXAI) |
| Released | September 21, 2026 |
| Weights | Closed, hosted only |
| Context window | 500,000 tokens |
| Input | Text and images |
| Output | Text |
| Reasoning effort | low, medium, high (default), xhigh |
| Knowledge cutoff | May 2026 |
| Parameters | About 2.1 trillion according to Musk; not in xAI's documentation |
| Output speed | About 188 tokens per second (Artificial Analysis) |
xAI's own API sets no output limit and adds built-in web search, X search and code execution, and Cursor and Grok Build offer a fast variant that runs at about twice the speed. On Unicorn API the model runs through the chat completions endpoint with function tools and replies of up to 128,000 tokens.
Where Grok 4.7 is strong
Long-running agents. The training recipe and the Terminal-Bench jump point the same way: give Grok 4.7 a shell, a goal and time, and it gets much further than Grok 4.6 did. Artificial Analysis now ranks it fourth among coding agents in their own makers' harnesses, behind only Claude Fable 5.1, GPT-6 Astra and Claude Opus 5.
Engineering and legal reasoning. EEBench and the Harvey benchmark are the two tests where Grok 4.7 beats everyone in xAI's comparison, by a wide margin on the legal test. Teams working on circuits, specifications or contract review get results that match or beat the frontier leaders on these tests.
Office deliverables. An AA-Briefcase score near Fable 5.1 and a GDPval-AA score that rises from 1605 to 1695 in Artificial Analysis' testing mean reports, briefs and spreadsheet work come out close to the best available.
Small, self-contained code. One early reviewer says it "one-shots small things beautifully": scripts, utilities and single-file tools.
Fewer made-up answers. Its hallucination rate on AA-Omniscience falls to 29%, and Artificial Analysis' Omniscience index rises from 30 to 32, so it is a little more willing to admit what it does not know than Grok 4.6 was.
Big inputs. Half a million tokens holds a large codebase or a pile of documents, and images go in alongside the text.
Weak spots and limits
Token appetite. At xhigh, Artificial Analysis counted about 81,000 output tokens per task in its index, against 36,000 for Grok 4.6 at high and 27,000 for GPT-6 Astra. Its Intelligence Index moves only two points, to 46, for all that extra thinking, and longer reasoning means longer waits even at 188 tokens per second.
Not the coding leader. Fable 5.1 is ahead by more than 20 points on Terminal-Bench and by 5.5 on CursorBench. Reviewers also find Grok 4.7 less impressive on large existing codebases than on fresh, small projects.
Visual and front-end work. Musk said before launch that multimodal performance still needed work, and xAI's post does not claim gains there. Early testers in China found 3D scenes and front-end pages below expectations, with stiff physics and weak SVG animation, and some reported unstable prompt following.
Health and high-stakes use. It trails both rivals on HealthBench Professional, and xAI's model card says Grok 4.7 is not intended for autonomous high-stakes use in medicine, law, finance or safety-critical systems without human oversight.
Text only. It reads images but does not create them.
How to prompt Grok 4.7
Match the effort to the job. high is the default; xhigh is where most of the published benchmark numbers come from and also where the token count balloons. For chat and well-specified edits, low or medium keeps replies quick and short.
Give long tasks a clear finish line and ask for the self-check the model was trained to do:
Migrate the attached settings module from INI files to TOML. Keep every key and default. When you finish, re-read your changes, list anything you could not verify, and stop.
For engineering questions, ask it to show its working and test its own answer:
A 12 V supply feeds a 3.0 V LED at 20 mA through a series resistor. Pick the nearest E12 value, give the resistor's power dissipation, and then check the result by recomputing the current with the chosen value.
For document work, state the audience and the format up front:
Turn these meeting notes into a one-page decision memo for an operations director: context, three options with their trade-offs, a recommendation, and open risks as a table.
In long agent loops, keep a stable prefix (system prompt, tool definitions, reference files) so cached input does the heavy lifting, and trim old tool output as the context grows.
Grok 4.7 against Grok 4.6, Claude and GPT
Against Grok 4.6. Better on every line of xAI's table, with fewer hallucinations and a larger base model. The catch is token use per task at high effort. If your Grok 4.6 workloads already run well at high, try Grok 4.7 at medium or high before reaching for xhigh.
Against Claude. Claude Opus 5 still ranks ahead on Artificial Analysis' coding-agent index and on AA-Briefcase, and Claude Fable 5.1 leads most of xAI's own table, by more than 20 points on Terminal-Bench. Grok 4.7 beats Fable 5.1 on EEBench (64.0% against 56.4%) and the Harvey legal test (19.6% against 6.7%). Claude Fable 5 is the Fable model in the Unicorn catalog.
Against OpenAI. GPT-5.6 Sol is roughly level on Terminal-Bench and slightly ahead on DeepSWE and HealthBench, but well behind on engineering, legal and office tasks. GPT-6 Astra ranks higher on coding agents and uses far fewer tokens per task: about 27,000 output tokens per index task against Grok 4.7's 81,000 at xhigh.
Pick Grok 4.7 for high-volume agents, engineering and legal analysis, and document work; pick a Claude or GPT flagship when the hardest coding is the priority.
Keeping token use in check
Because reasoning tokens count as output and sit inside max_tokens, effort is the main lever on how long a task takes and how much it writes. A task that runs to 81,000 output tokens at xhigh needs a max_tokens well above that, while lower settings spend less of that limit on thinking. Unicorn allows replies of up to 128,000 tokens.
A practical routine is to start at medium, measure where answers fall short, and raise effort only for those task types. Keep a stable prompt prefix, with system instructions, tool definitions and reference files first, so repeated agent steps reuse cached input instead of reprocessing it. With a 500,000-token window, long agent loops still benefit from trimming stale tool output and summarising finished sub-tasks, which also plays to xAI's claim that the model is better at managing longer context.
Getting started
Open Grok 4.7 in the Playground to try it without code. For your own apps, create an API key and call /v1/chat/completions with the model id grok-4-7. Images go in as image_url parts and tools as function definitions. Set reasoning_effort to low, medium, high or xhigh, or leave it out for the default, and remember that max_tokens includes reasoning. The docs cover streaming, tools and usage reporting.
Verdict
Grok 4.7 is a solid half-step for xAI: a bigger base model, a training run aimed at long tasks, and real gains on terminal agents, office work, engineering and law, all on Grok 4.6's context window and API. It is not the model that beats everything, as Musk once promised, and at xhigh it spends tokens freely. Used at sensible effort settings, it is one of the strongest options for engineering, legal and office work.
Best for
- Long-running coding agents
- Electrical engineering questions
- Legal analysis and contract work
- Reports, briefs and spreadsheets
- Small scripts and single-file tools
- Large documents and codebases
Frequently asked questions
Is Grok 4.7 open source?
No. Grok 4.7 is a proprietary xAI model with closed weights, available only as a hosted model. xAI has published weights for older models such as Grok-1 and Grok 2.5, but not for Grok 3 or any Grok 4 release.
Which reasoning effort should I use with Grok 4.7?
High is the default. Xhigh produces most of the published benchmark numbers but used about 81,000 output tokens per task in Artificial Analysis' testing, so start at medium or high and raise effort only where answers fall short.
How many parameters does Grok 4.7 have?
Elon Musk has said Grok 4.7 runs on a base model of about 2.1 trillion parameters, up from 1.5 trillion for Grok 4.6. xAI's launch post and documentation only say the base model is larger and give no architecture details.
Grok 4.7 vs Grok 4.6: what changed?
Grok 4.7 has a larger base model and a longer reinforcement learning run on multi-hour tasks. It scores higher on every benchmark in xAI's table, most of all Terminal-Bench, but uses about twice as many output tokens per task at top effort.
What is the Grok 4.7 context window?
500,000 tokens of text and images. On Unicorn API a single reply can be up to 128,000 tokens, with reasoning counted inside that limit.
Can Grok 4.7 read images?
Yes. It accepts images alongside text and answers in text; it does not generate images. On Unicorn API you send images as image_url parts in the chat messages.