Grok 4.5 API
XAI's Cursor-trained 1.5T model for coding agents
Trained jointly with Cursor on a new 1.5-trillion-parameter base, Grok 4.5 lands fourth on the Intelligence Index and leads a long-task coding test, using a fraction of the tokens its rivals need.
- Kind: chat
- Made by: xAI (SpaceXAI), trained jointly with Cursor
- 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-07-08
- 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)
- Architecture: Mixture-of-experts
- Parameters: About 1.5 trillion per Elon Musk; not in xAI's docs
- Knowledge cutoff: February 1, 2026
- 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-5, or try it in the Playground.
Where it shines
- Artificial Analysis Intelligence Index 54, fourth overall and 16 points above Grok 4.3
- Leads SWE Marathon at 29.0%, ahead of Claude Opus 4.8 and Fable 5
- About 4.2 times fewer output tokens than Claude Opus 4.8 on SWE-Bench Pro
- Coding Agent Index 76, level with GPT-5.5 in Codex
- Trained on trillions of tokens of real Cursor developer interactions
Watch out for
- Well behind Claude Fable 5 and Opus 4.8 on SWE-Bench Pro
- Hallucination rate on AA-Omniscience rose from 25% to 54% over Grok 4.3
- CursorBench dropped after Cursor code leaked into the training data
- Half Grok 4.3's context window, no video input and no way to switch reasoning off
Grok 4.5 is the new flagship language model from xAI, Elon Musk's AI lab, which now operates inside SpaceX as SpaceXAI. It launches on July 8, 2026, and it is the first Grok trained jointly with Cursor, the AI code editor that SpaceX agreed to buy last month. xAI calls it its smartest model "built for coding, agentic tasks, and knowledge work", and Musk calls it "an Opus-class model", adding that xAI's internal assessment found it "roughly comparable to Opus 4.7, but much faster."
Efficiency is what makes that claim interesting. On Artificial Analysis' Intelligence Index Grok 4.5 scores 54 and places fourth, behind only Claude Fable 5, GPT-5.5 and Claude Opus 4.8, and it gets there while spending far fewer tokens than any of them. On SWE-Bench Pro it writes about a quarter of the output tokens Opus 4.8 needs for the same task.
It is not a clean win. Grok 4.5 trails the leaders on the hardest software-engineering tests, a Cursor benchmark had to be pulled from the launch because of a training-data mix-up, and independent testing finds it hallucinates more than its predecessor. But as a fast, token-lean engine for coding agents, it moves xAI right up to the frontier.
SpaceXAI, Cursor and a 1.5T base: where Grok 4.5 comes from
xAI merged with SpaceX in February 2026, and in June SpaceX agreed to acquire Cursor in an all-stock deal, which had not closed by launch day. Grok 4.5 is the first product of that pairing. Cursor describes it as a mixture-of-experts model "that we trained jointly with SpaceXAI", calling it "our most powerful model yet and the first we've built for more than software engineering."
The base model is new. On June 28, when the model entered private beta at SpaceX and Tesla, Musk wrote that Grok 4.5 is "based on our 1.5T V9 foundation model, with Cursor data added in supplemental training". That puts it at about 1.5 trillion parameters, though xAI's launch post and documentation do not state a parameter count or describe the architecture beyond the mixture-of-experts design Cursor mentions.
Grok 4.5 follows Grok 4.3, which reached the public API at the end of April as a general model with a one-million-token window and video input. The new release changes the brief: where Grok 4.3 was a fast all-rounder, Grok 4.5 is built for long coding sessions, agents and office deliverables.
The model 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.5 cannot be downloaded or self-hosted. On launch day it is available on xAI's API as grok-4.5, in Grok Build (xAI's coding agent) and in Cursor across desktop, web, iOS, the CLI and the SDK. xAI's API serves it from US regions only, and EU API users are not included at launch.
What changed from Grok 4.3
- A bigger base and Cursor data. Grok 4.5 moves to the 1.5T V9 base and is trained on "trillions of tokens of Cursor data which capture a wide-range of user interactions with codebases and software tools", alongside STEM tasks, research papers and other knowledge work.
- A large jump in measured intelligence. Artificial Analysis scores it 54 on its Intelligence Index, 16 points above Grok 4.3's 38.
- Fewer tokens per task. On SWE-Bench Pro, xAI reports an average of 15,954 output tokens per task against 67,020 for Claude Opus 4.8 at max effort, about 4.2 times fewer. Artificial Analysis finds its token use more than 60% lower than Opus 4.8's on the index.
- Office documents. xAI highlights work in Word and PowerPoint: "The model is capable of using native PowerPoint shapes to build complex diagrams."
- Reasoning on by default. The default effort rises from
lowon Grok 4.3 tohigh, and reasoning cannot be switched off. - Smaller window, no video. The context window halves from one million tokens to 500,000. Grok 4.3 also accepted video input; Grok 4.5 takes text and images.
How xAI and Cursor trained it
xAI says Grok 4.5 was trained on "tens of thousands of NVIDIA GB300 GPUs", with reinforcement learning across "hundreds of thousands of tasks" focused on real software-engineering work. The data pipeline got as much attention as the compute: "We invested heavily in data filtering and curation: deduplication, quality scoring, and domain-focused selection so that the data mixture stayed high-coverage and high-signal."
The Cursor data is the distinctive ingredient. It records how developers and agents actually move through codebases, run tools and recover from mistakes, which is exactly the behaviour a coding agent needs. It also caused the launch's one embarrassment. Cursor disclosed that "an earlier snapshot of the Cursor codebase was accidentally included in training", which gives Grok 4.5 an advantage on CursorBench, Cursor's own evaluation. "The exact impact is unclear," Cursor wrote, and CursorBench scores were left out of the launch results; the data has been removed for future models.
Grok 4.5 benchmarks
xAI's launch chart compares Grok 4.5 at high effort with rivals at their top settings:
| Benchmark | Grok 4.5 | Claude Fable 5 | GPT-5.5 | Claude Opus 4.8 |
|---|---|---|---|---|
| SWE Marathon | 29.0% | 24.0% | not shown | 26.0% |
| Terminal-Bench 2.1 | 83.3% | 84.3% | 83.4% | 78.9% |
| DeepSWE 1.0 | 62.0% | 66.1% | 64.3% | 55.8% |
| DeepSWE 1.1 | 53% | 70% | 67% | 59% |
| SWE-Bench Pro | 64.7% | 80.4% | 58.6% | 69.2% |
| SWE-Bench Multilingual | 78.0% | not shown | 77.8% | 84.4% |
Rival figures are as xAI charted them. Anthropic's own published numbers differ in places: 80% for Fable 5 on SWE-Bench Pro, and 74.6% for Opus 4.8 on Terminal-Bench 2.1 at its launch.
The pattern is clear. Grok 4.5 leads SWE Marathon, which, as the name suggests, targets long engineering tasks, and sits within a point of the best on Terminal-Bench 2.1. It is a few points behind on DeepSWE 1.0, further behind on DeepSWE 1.1, and a long way behind Fable 5 on SWE-Bench Pro.
Artificial Analysis adds an independent view. Beyond the index score of 54, it measures a GDPval-AA Elo of 1543 for knowledge work and the top score on τ³-Banking, a customer-service agent test, at 33% against 31% for GPT-5.5. Running in Grok Build, Grok 4.5 scores 76 on its Coding Agent Index, on par with GPT-5.5 in Codex, using about 1.9 million tokens per task. Its token use across the whole Intelligence Index is more than 60% lower than Opus 4.8's.
Grok 4.5 specs
| Grok 4.5 | |
|---|---|
| Maker | xAI (SpaceXAI), trained jointly with Cursor |
| Released | July 8, 2026 |
| Weights | Closed, hosted only |
| Architecture | Mixture-of-experts |
| Parameters | About 1.5 trillion according to Musk; not in xAI's documentation |
| Context window | 500,000 tokens |
| Input / output | Text and images in, text out |
| Reasoning effort | low, medium, high (default) |
| Knowledge cutoff | February 1, 2026 |
| Speed | About 80 tokens per second, per xAI |
xAI's API processes requests in US regions only, and Cursor also offers a faster variant inside its editor. On Unicorn API the model runs through the chat completions endpoint with function tools, image input, JSON mode and replies of up to 128,000 tokens.
Where Grok 4.5 is strong
Long coding sessions. The SWE Marathon lead and a near-top Terminal-Bench result point to a model that holds up over many steps of real engineering work, which is what Cursor's interaction data was meant to teach. Hands-on testers report working first attempts: DataCamp's dashboard build in Cursor "ran on the first attempt".
Token efficiency. Using roughly a quarter of the output tokens Opus 4.8 needs on SWE-Bench Pro means shorter waits for each finished task, and at about 80 tokens per second every token it skips shows up directly as speed. For agents that run all day, that compounds.
Frontier agent results with lean reasoning. A Coding Agent Index score level with GPT-5.5, a fourth-place Intelligence Index result and the leanest token use among the top models make Grok 4.5 one of the most efficient frontier options at launch. Hands-on reviewers summed it up as a "highly capable, highly efficient workhorse".
Agents and office work. The τ³-Banking lead and xAI's focus on Word and PowerPoint suggest it is useful beyond code, for structured documents, presentations and tool-driven business workflows.
Large inputs. Half a million tokens holds a sizeable repository or a stack of documents, with screenshots and diagrams alongside the text.
Weak spots and limits
Not the strongest engineer. On SWE-Bench Pro, Grok 4.5 scores 64.7% against about 80% for Fable 5 and 69.2% for Opus 4.8, and on DeepSWE 1.1 it trails all three leaders. For the hardest autonomous fixes, the premium models still win.
More confident mistakes. Artificial Analysis' AA-Omniscience test shows accuracy rising from 35% to 52% over Grok 4.3, but the hallucination rate rising from 25% to 54%: when Grok 4.5 does not know, it now guesses more often than it admits it. DataCamp's decision-memo test found the contradictions in a brief but got a basic comparison of figures wrong and "introduced an unsupported number". One newsletter put it bluntly: it "got smarter and more than twice as willing to bluff". Facts, figures and citations need checking.
A contaminated benchmark and a thin paper trail. The CursorBench mix-up removes one of the most relevant coding tests from the record, and xAI did not publish a model card alongside the launch, which drew criticism under California's new transparency law. Grok's earlier controversies over offensive outputs remain a procurement question for some companies.
Trade-offs against Grok 4.3. The window is half the size, video input is gone, and reasoning cannot be turned off, so even short answers carry some thinking time and extra output tokens.
No extra-high effort. xAI's documentation lists xhigh, but on Grok 4.5 such requests are treated as high.
Access limits. Text output only, US-only processing on xAI's API, and no EU availability at launch.
How to prompt Grok 4.5
Use high effort, the default, for real engineering and analysis; medium keeps longer chats responsive; low suits simple tool calls and quick edits where latency matters.
For coding, give it the code, the symptom and a finish line:
Here is the payment retry module and the failing test output. Find the root cause, fix it with the smallest change, add a regression test, and explain the bug in two sentences.
For agents, state when to stop so it does not keep exploring:
Update every API handler in the attached files to validate its input. Run the tests after each file. Stop when all tests pass and list the files you changed.
For office work, name the reader and the format, and ask for a check:
Turn these meeting notes into a one-page project update for the finance team: status table, three risks, next steps with owners. Then list any figure you could not find in the notes.
Because hallucinations rose, ask it to separate what the input says from what it assumes, and supply source documents rather than relying on its memory for facts and numbers.
Grok 4.5 against Claude, Gemini and GPT
Against Claude Opus. Claude Opus 4.8 leads on SWE-Bench Pro and SWE-Bench Multilingual, while Grok 4.5 wins SWE Marathon and Terminal-Bench 2.1 and uses about a quarter of the output tokens. Musk's own comparison point, Claude Opus 4.7, scores 64.3% on SWE-Bench Pro to Grok 4.5's 64.7%, and only 40.1% on DeepSWE 1.0 against 62.0%.
Against Claude Fable 5. Claude Fable 5 is the stronger model on almost every coding test and at the top of the Intelligence Index, with a 16-point lead on SWE-Bench Pro. Pick it when the hardest problems demand the most accurate engineer available.
Against mid-tier models. Claude Sonnet 5 is the closest Anthropic match by tier; Artificial Analysis puts Grok 4.5 ahead of Sonnet 5 at max effort on its Intelligence Index. Gemini 3 Pro and GPT 5.2 are general chat options with less coding focus.
Against GPT-5.5. GPT-5.5 edges Grok 4.5 on Terminal-Bench 2.1 by a tenth of a point and leads on both DeepSWE versions, but Grok 4.5 is ahead on SWE-Bench Pro (64.7% against 58.6%), level on Artificial Analysis' Coding Agent Index and slightly ahead on τ³-Banking.
Pick Grok 4.5 for coding agents, long engineering sessions and office deliverables where speed and token efficiency matter; pick Fable 5 or Opus 4.8 when top accuracy on hard fixes matters most.
Running Grok 4.5 in an agent loop
Reasoning tokens count as output and sit inside the max_tokens limit, so leave plenty of room at high effort: a long thinking pass can use a large share of a small cap before the visible answer starts. Up to 128,000 tokens per reply are available on Unicorn.
Keep the stable part of each request, such as instructions, tool definitions and repository files, at the start of the prompt so repeated agent steps can reuse cached input. With a 500,000-token window there is room for a sizeable codebase, but a loop that appends every tool result will reach that ceiling sooner than it would have on Grok 4.3's one million, so trim old tool output or summarise finished steps.
Requests for xhigh effort are accepted but run as high, so there is no hidden tier above the default. If replies feel slow for simple steps such as file lookups or formatting, drop those calls to low.
Getting started
Try Grok 4.5 in the Playground without writing code. For your own apps, create an API key and call /v1/chat/completions with the model id grok-4-5. Images go in as image_url parts, tools as function definitions, and reasoning_effort takes low, medium or high; leave it out for the default. max_tokens includes reasoning. The docs cover streaming, tools and usage reporting.
Verdict
Grok 4.5 is xAI's most serious move into coding and agents: a new 1.5T base, Cursor's interaction data, a lead on SWE Marathon and a place in the top four of the Intelligence Index, all with unusually lean token use. It is not the best engineer on the hardest tests, it bluffs more than Grok 4.3, and the launch was light on documentation. For teams that want a fast, efficient and capable model behind their coding agents, it is one of the strongest choices at launch.
Best for
- Coding agents and long engineering sessions
- Terminal and tool-driven automation
- Word and PowerPoint deliverables
- High-volume agent loops that need lean token use
- Large codebases and document sets
Frequently asked questions
Is Grok 4.5 open source?
No. Grok 4.5 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 levels does Grok 4.5 support?
Low, medium and high, with high as the default. Reasoning cannot be switched off, and requests for xhigh are accepted but treated as high.
How many parameters does Grok 4.5 have?
Elon Musk has said Grok 4.5 is based on xAI's 1.5 trillion parameter V9 foundation model, with Cursor data added in supplemental training. xAI's documentation does not give a parameter count; Cursor describes it as a mixture-of-experts model.
Is Grok 4.5 as good as Claude Opus?
Partly. Musk calls it an Opus-class model, and it beats Claude Opus 4.8 on SWE Marathon and Terminal-Bench 2.1 while using far fewer tokens, but Opus 4.8 is ahead on SWE-Bench Pro and SWE-Bench Multilingual, and Claude Fable 5 is ahead on most coding tests.
What is the Grok 4.5 context window?
500,000 tokens of text and images, half of Grok 4.3's one million. On Unicorn API a single reply can be up to 128,000 tokens, with reasoning counted inside that limit.
What is the connection between Grok 4.5 and Cursor?
Cursor and xAI trained Grok 4.5 together on trillions of tokens of Cursor interaction data, and it launched inside Cursor on day one. Cursor disclosed that an old snapshot of its own codebase slipped into training, so CursorBench scores were left out.