On July 8, 2026, xAI shipped: Grok 4.5 is now public, aimed squarely at the coding-agent market Anthropic and OpenAI have owned for the past year. It’s a 1.5-trillion-parameter mixture-of-experts model trained heavily on Cursor interaction data. It posted an 83.3% score on Terminal-Bench 2.1 while spending roughly a quarter of the output tokens Claude Opus 4.8 burns on the same tasks. If you write code for a living — or you pay for the agents that write it — that token math is the whole story. Cheaper, faster, and benchmark-competitive is exactly the combination that moves developers off an incumbent.
What’s actually new about Grok 4.5
The headline is the training data, not just the parameter count. xAI didn’t scale up a general model and hope coding fell out — it trained Grok 4.5 on real Cursor interaction data: traces of developers accepting, rejecting, and editing agent suggestions inside an actual IDE. That’s a fundamentally different signal from scraping public repositories. Public code shows you the finished product; interaction data shows you the loop — how a human corrects an agent, what a good multi-file edit looks like, and when to stop. This is the insight that made instruction tuning work, applied to the agentic coding workflow.
The architecture is a 1.5T-parameter MoE, so only a fraction of those weights activate on any given token. That’s how xAI gets frontier-class quality without frontier-class inference cost, and it’s the mechanism behind the efficiency claim that anchors this xAI Grok 4.5 release: on Terminal-Bench 2.1, Grok 4.5 scored 83.3% while consuming roughly 25% of the output tokens Opus 4.8 uses on the identical benchmark. Terminal-Bench is a hard, agentic evaluation — the model has to operate a shell, run commands, read output, and iterate toward a goal, not just autocomplete a function. Scoring in the low 80s there while staying that terse is the kind of result that shows up on procurement spreadsheets.
Token efficiency is not a vanity metric in agent workflows. Coding agents loop — plan, edit, run tests, read the failure, edit again — and every loop pays for output tokens. A model that reaches the same answer in a quarter of the tokens isn’t 4x cheaper in theory; it’s 4x cheaper on your actual monthly bill, and it’s usually faster to a final answer because there’s less to generate. That’s the argument xAI is making, and it’s a good one.
Why the Grok 4.5 coding benchmark matters
- The cost floor for capable coding agents just dropped. When a model hits ~83% on Terminal-Bench 2.1 at a quarter of the output tokens, competitors have to answer on price, efficiency, or both. Everyone downstream benefits.
- Interaction-data training is a moat you can’t scrape. Anyone can crawl GitHub. Cursor-scale IDE interaction traces are proprietary, and training on them may become the defining advantage in agentic coding — expect every serious lab to chase equivalent data.
- Token efficiency reshapes agent design. If output tokens are cheap, you can afford more iterations, deeper test loops, and larger multi-file refactors per task without blowing the budget.
- Vendor lock-in gets weaker. A credible, cheaper alternative gives teams real negotiating leverage and a genuine fallback if an incumbent raises prices or throttles capacity.
- Benchmarks are converging at the top. The gap between the leading coding models is now measured in single-digit percentage points. Differentiation is shifting from raw capability to cost, latency, context handling, and tooling.
- xAI is now a first-tier coding vendor, not a chat novelty. This release repositions Grok from “the edgy chatbot” to a serious option in the one AI category that reliably prints revenue.
How to use Grok 4.5 today
Grok 4.5 is available through xAI’s API, which is OpenAI-compatible, so most existing tooling works with a base-URL swap. Here’s how to get running.
-
Grab an API key. Sign in at the xAI developer console, create a key, and export it so your tools can find it:
export XAI_API_KEY="xai-your-key-here" -
Make your first call. The endpoint is OpenAI-compatible, so a plain curl works:
curl https://api.x.ai/v1/chat/completions \ -H "Authorization: Bearer $XAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "grok-4.5", "messages": [ {"role": "system", "content": "You are a senior engineer. Be terse."}, {"role": "user", "content": "Write a Python function that retries an HTTP GET with exponential backoff."} ] }' -
Point an existing SDK at it. Because the API mirrors OpenAI’s schema, you reuse the official OpenAI client and only change the base URL:
from openai import OpenAI client = OpenAI( api_key="xai-your-key-here", base_url="https://api.x.ai/v1", ) resp = client.chat.completions.create( model="grok-4.5", messages=[ {"role": "user", "content": "Refactor this module for testability and explain the change."}, ], ) print(resp.choices[0].message.content) -
Wire it into your agent or editor. Any tool that accepts a custom OpenAI-compatible endpoint — including Cursor’s “custom model” setting — can target Grok 4.5. In most editors it’s a config block like this:
{ "model": "grok-4.5", "apiBase": "https://api.x.ai/v1", "apiKey": "env:XAI_API_KEY" } -
Prompt it like an agent, not a chatbot. Grok 4.5 was trained on iterative IDE workflows, so it rewards explicit goals, constraints, and a defined stopping condition. A prompt that works well:
Goal: make the failing test in tests/test_auth.py pass. Constraints: don't touch the public API; add a test for the edge case you fix. Process: run the test, read the failure, edit, re-run until green. Stop when green.
Because the model is so token-efficient, keep your test-and-iterate loops tight and let it run more cycles rather than asking for one giant response. That plays to its strengths — and to your budget.
How it compares: Grok 4.5 vs Claude Opus 4.8
The comparison everyone will run is Grok 4.5 vs Claude Opus 4.8, since Opus 4.8 has been the default agentic-coding pick. Here’s the head-to-head on the numbers we have.
| Dimension | Grok 4.5 (xAI) | Claude Opus 4.8 (Anthropic) |
|---|---|---|
| Terminal-Bench 2.1 score | 83.3% | Competitive (leading incumbent) |
| Output tokens on the same tasks | ~25% of Opus 4.8 | Baseline (4x more) |
| Architecture | 1.5T-param mixture-of-experts | Frontier dense/hybrid |
| Distinctive training data | Cursor IDE interaction traces | Broad code + RLHF |
| API compatibility | OpenAI-compatible | Anthropic Messages API |
| Public availability | July 8, 2026 | Generally available |
The honest read: on the specific Terminal-Bench 2.1 score and token cost, Grok 4.5 has a clear efficiency edge and a competitive quality result. But a single benchmark isn’t your codebase. Opus 4.8 has a longer public track record, mature tooling, and a large base of teams who already trust its behavior on messy, real-world repos. Don’t switch on a press release — run both against your own hardest tasks and measure. Benchmarks tell you who’s in the conversation; your regression suite tells you who to pay.
What’s next for Grok 4.5
The first thing to watch is whether the token-efficiency advantage holds up outside the benchmark. Terminal-Bench 2.1 is a strong, realistic eval, but production codebases are dirtier — weird build systems, sprawling monorepos, undocumented internal conventions. If Grok 4.5’s terseness survives contact with your repo, xAI has a durable cost story. If the model starts spending far more tokens once tasks get genuinely ambiguous, the headline number will look softer in six months. Early adopters posting real-world token counts will settle this faster than any marketing.
The second thing is the data flywheel. Training on Cursor interaction data is a strategy, and strategies get copied. Expect Anthropic, OpenAI, and Google to lean harder into their own agentic interaction data, and expect editors and agent platforms to become even more valuable as data sources. The Cursor-trained AI model approach may turn interaction traces into the most contested asset in the space — which raises real questions about who owns that data and how it’s used. Watch for both product announcements and policy fights here.
Finally, watch Grok 4.5 pricing and rate limits as they settle. Launch pricing and launch capacity are rarely the steady state. The efficiency claim only translates into savings if xAI’s per-token rates and throughput stay competitive under real load. Keep an eye on context-window limits, tool-calling reliability, and how the model handles very large multi-file edits — those are the areas where agentic coding models tend to quietly fall short, and where the next round of releases will compete.
Frequently Asked Questions
What is Grok 4.5?
Grok 4.5 is xAI’s coding-focused large language model, made public on July 8, 2026. It’s a 1.5-trillion-parameter mixture-of-experts model trained on Cursor IDE interaction data, and it scored 83.3% on Terminal-Bench 2.1 while using roughly a quarter of the output tokens Claude Opus 4.8 uses on the same tasks.
Why does the Grok 4.5 coding benchmark matter so much?
Because it pairs a competitive quality score with dramatically lower token usage. In agentic coding, models loop repeatedly and you pay for output tokens each time, so a 4x reduction in tokens is close to a 4x reduction in cost for those workflows — and usually a speed improvement too. That combination makes the benchmark result strategically important, not just impressive.
How does Grok 4.5 compare to Claude Opus 4.8?
On Terminal-Bench 2.1, Grok 4.5 scored 83.3% while spending about 25% of the tokens Opus 4.8 uses. That’s a strong efficiency win with competitive quality. Opus 4.8 still has a longer public track record and mature tooling, so benchmark both on your own hardest tasks before switching production workloads.
What does “Cursor-trained” actually mean?
xAI trained Grok 4.5 on data from real developer interactions inside the Cursor editor — the accept, reject, and edit signals from people using an AI agent — rather than only on static public code. That teaches the model the iterative correction loop of real coding, which is likely why it performs well on agentic benchmarks.
How do I start using Grok 4.5?
Get an API key from xAI’s developer console and call the OpenAI-compatible endpoint at https://api.x.ai/v1 using the model name grok-4.5. Reuse the OpenAI SDK by swapping the base URL, and plug it into any editor or agent that supports a custom OpenAI-compatible model.
Is Grok 4.5 cheaper than the alternatives?
On the token-efficiency dimension, yes — it uses far fewer output tokens for comparable results, which lowers real costs in iterative agent workflows. Final Grok 4.5 pricing and rate limits will determine the total picture, so confirm current per-token rates and throughput in xAI’s console before committing a production budget.
Go deeper than this article
This article covers the essentials. Our premium eguide library gives you the full step-by-step playbooks — prompts, workflows, and copy-paste recipes you can put to work today.