xAI dropped Grok 4.5 on July 8, 2026, and the headline number is not the one anyone expected. Instead of chasing a marginal bump on the usual reasoning leaderboards, xAI led with a benchmark that maps to actual engineering work: 64.7% on SWE-bench Pro, the harder, contamination-resistant successor to the classic SWE-bench that grades agents on multi-file, real-repository pull requests. The second number sitting next to it makes the release disruptive — Grok 4.5 solved those tasks while burning roughly 4.2x fewer output tokens per task than frontier peers like Opus 4.8. For anyone running agents at scale, that reframes the frontier race away from raw scores and toward cost-per-solved-task, the metric that actually shows up on your invoice.
What’s actually new in Grok 4.5
The core of the xAI Grok 4.5 release is a retrained reasoning stack that xAI describes as “verbosity-penalized.” Prior frontier models were tuned to think out loud — long chain-of-thought traces that inflate accuracy but also inflate token counts, latency, and price. Grok 4.5 was optimized with a reward signal that explicitly discounts tokens spent, so the model learns to reach a verified answer with the shortest defensible reasoning path. It reads terser in its scratchpad but lands correct patches more often on agentic coding tasks.
On Grok 4.5 SWE-bench Pro, the 64.7% resolve rate puts it at or near the top of the public board, edging past the reasoning-heavy incumbents. The token-efficiency claim deserves scrutiny, and so far it appears to hold: independent replications on the SWE-bench Pro harness show Grok 4.5 averaging a fraction of the output tokens per instance compared to Opus 4.8 and the Gemini 3 Pro agentic mode. Fewer output tokens at a comparable price-per-token drops the effective cost to close a ticket sharply — which is the entire pitch.
Beyond coding, xAI shipped a 2M-token context window (up from Grok 4’s 256K), a hardened tool-use format that reduces malformed function calls, and a new reasoning_effort parameter that lets you dial the thinking budget per request rather than per model. Grok 4.5 pricing 2026 lands at roughly $3 per million input tokens and $12 per million output tokens on the standard tier — comparable to rivals on paper, but the token-efficiency multiplier is where the real savings compound.
Why it matters
- Cost-per-task becomes the frontier metric. A model that resolves a ticket in 3,000 output tokens beats one that resolves it in 13,000, even at identical per-token pricing. Grok 4.5 benchmarks make that trade legible for the first time on a standardized harness.
- Agentic workloads get cheaper to run at scale. If you run hundreds of autonomous coding agents in CI, a 4.2x reduction in output tokens is the difference between a pilot and a production line-item you can defend to finance.
- Latency drops as a side effect. Fewer output tokens means faster wall-clock completion, which matters for interactive dev-loop tools where a developer waits on the diff.
- SWE-bench Pro is harder to game. Because the benchmark resists contamination and demands real multi-file changes, a strong score predicts on-the-job performance better than the older, saturated boards.
- The verbosity-penalty approach is a template. Expect every lab to ship a token-efficient variant within two quarters; Grok 4.5 vs Opus 4.8 is the opening shot, not the final word.
- Buyers gain leverage. When the differentiator shifts from “who scores highest” to “who costs least per solved task,” switching costs fall and the market gets more competitive.
How to use Grok 4.5 today
-
Get an API key. Provision one from the xAI console and export it. Grok 4.5 is exposed through xAI’s OpenAI-compatible endpoint, so most existing SDKs work with a base-URL swap.
export XAI_API_KEY="xai-...your-key..." export XAI_BASE_URL="https://api.x.ai/v1" -
Make a baseline call. Use the OpenAI-compatible client and point it at xAI. Note the new
reasoning_effortfield.from openai import OpenAI client = OpenAI( api_key=os.environ["XAI_API_KEY"], base_url="https://api.x.ai/v1", ) resp = client.chat.completions.create( model="grok-4.5", reasoning_effort="medium", # "low" | "medium" | "high" messages=[ {"role": "system", "content": "You are a terse senior engineer."}, {"role": "user", "content": "Refactor this function to remove the nested loop and explain the complexity change."}, ], ) print(resp.choices[0].message.content) print(resp.usage) # watch completion_tokens — this is where the savings show up -
Tune for cost-per-task, not tokens-per-call. Start at
reasoning_effort="low"and only escalate when a task fails verification. This is the single biggest lever on your bill — most tickets resolve at low effort.curl https://api.x.ai/v1/chat/completions \ -H "Authorization: Bearer $XAI_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "grok-4.5", "reasoning_effort": "low", "messages": [ {"role": "user", "content": "Fix the failing test in cart_service.py; return only a unified diff."} ] }' -
Wire it into an agent loop. If you run a SWE-bench-style harness, the drop-in is minimal — swap the model string and add an effort escalation ladder.
def solve(task, attempt=0): effort = ["low", "medium", "high"][min(attempt, 2)] patch = call_grok(task, reasoning_effort=effort) if run_tests(apply(patch)): return patch if attempt < 2: return solve(task, attempt + 1) raise Exception("unresolved after 3 attempts") -
Instrument your token spend. Log
completion_tokensper resolved task and divide by your resolve rate. That ratio — cost per solved task — is the number to compare across models, and it's where Grok 4.5 token efficiency earns its keep.
How it compares
The table below reflects publicly reported figures on the SWE-bench Pro harness as of mid-July 2026. Token-per-task numbers are approximate averages and will vary with your harness and effort settings.
| Model | SWE-bench Pro | Rel. output tokens/task | Context window | Output price (per 1M) |
|---|---|---|---|---|
| Grok 4.5 | 64.7% | 1.0x (baseline) | 2M | ~$12 |
| Opus 4.8 | ~63% | ~4.2x | 1M | ~$75 |
| Gemini 3 Pro (agent) | ~61% | ~3.1x | 2M | ~$15 |
| GPT-5.5 | ~60% | ~2.8x | 512K | ~$20 |
The Grok 4.5 vs Opus 4.8 line is the one to sit with. On raw resolve rate the two land within a point or two of each other — a statistical tie for most practical purposes. But on the axis that determines what a fleet of agents costs to run, Grok 4.5 sits in a different weight class: comparable accuracy, a fraction of the output tokens, and a lower headline output price. If your workload is dominated by output tokens — and agentic coding almost always is — the effective cost delta is large enough to change which model you standardize on.
What's next
The obvious next move from every lab is a verbosity-penalized variant of its own flagship, and the smart bet is that "efficient" tiers become standard SKUs by Q4 2026. Once token efficiency is a first-class product dimension, benchmark reporting will follow — expect SWE-bench Pro leaderboards to publish cost-per-solved-task alongside resolve rate, because a bare percentage now hides the number buyers actually care about.
For xAI specifically, watch three things. First, whether the token-efficiency edge survives on messier, private codebases rather than the curated benchmark — the gap tends to shrink on real repos with sprawling context. Second, the rollout of the promised Grok 4.5 Code Fast tier, which xAI has teased as an even cheaper distilled variant aimed squarely at high-volume CI agents. Third, reliability of the hardened tool-use format under long-horizon agent runs, where malformed calls compound into failures.
The broader signal is that the frontier is fragmenting into axes — raw capability, context length, latency, and now cost-efficiency — and no single model will dominate all of them. That's good for anyone building on top: the winning strategy in 2026 is a router that sends each task to the cheapest model that can solve it, escalating only on failure. Grok 4.5 makes that architecture more attractive, because for a large slice of coding work it is now the cheapest model that clears the bar.
Frequently Asked Questions
What is the headline Grok 4.5 benchmark result?
Grok 4.5 scored 64.7% on SWE-bench Pro, the contamination-resistant successor to SWE-bench that grades agents on real multi-file pull requests. Just as important, it did so using roughly 4.2x fewer output tokens per task than Opus 4.8, which reframes the comparison around cost-per-solved-task.
How does Grok 4.5 achieve its token efficiency?
xAI retrained the reasoning stack with a reward signal that penalizes tokens spent, so the model learns the shortest defensible reasoning path to a verified answer rather than thinking out loud at length. The new reasoning_effort parameter lets you push that further per request.
Is Grok 4.5 actually better than Opus 4.8?
On raw SWE-bench Pro resolve rate they land within a point or two — effectively a tie. The Grok 4.5 vs Opus 4.8 story is about efficiency: comparable accuracy at a fraction of the output tokens and a lower output price, which makes Grok 4.5 meaningfully cheaper to run at scale.
What does Grok 4.5 pricing look like in 2026?
Standard-tier pricing runs roughly $3 per million input tokens and $12 per million output tokens. The real savings come from the token-efficiency multiplier — because agentic workloads are output-dominated, fewer output tokens per task compounds into a lower effective cost per resolved ticket.
Can I use Grok 4.5 with my existing OpenAI SDK?
Yes. Grok 4.5 is served through xAI's OpenAI-compatible endpoint. Point your client at https://api.x.ai/v1, swap in your XAI_API_KEY, and set the model to grok-4.5. Most agent frameworks work with just a base-URL change plus the optional reasoning_effort field.
Should I switch all my agents to Grok 4.5?
Not blindly. Instrument cost-per-solved-task on your own workload before standardizing — the benchmark edge can shrink on messier private repositories. The durable win is a routing layer that sends each task to the cheapest capable model and escalates effort only on failure; Grok 4.5 is often the cheapest model that clears the bar for coding work.
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.