xAI shipped Grok 4.5 to general availability on July 8, and it is now live in Grok Build, Cursor on every plan, and through the SpaceXAI API. Skip the benchmark table for a moment. The number that actually matters is this: Grok 4.5 resolves a SWE-Bench Pro task using an average of 15,954 output tokens. Claude Opus 4.8 at maximum uses 67,020. That 4.2x gap — combined with $2/$6 per million tokens — makes Grok 4.5 roughly 10x cheaper per completed coding task than Opus 4.8. That changes the economics of production agent workloads.
Pricing That Disrupts the Agent Math
Grok 4.5 enters at $2 per million input tokens and $6 per million output tokens, with cached input dropping to $0.50. Here is how it stacks up against the models it will compete with daily:
| Model | Input ($/MTok) | Output ($/MTok) |
|---|---|---|
| Grok 4.5 | $2.00 | $6.00 |
| Claude Sonnet 5 | $2.00 | $10.00 (intro, through Aug 31) |
| GPT-5.6 Terra | $2.50 | $15.00 |
| GPT-5.6 Luna | $1.00 | $6.00 |
On output price alone, Grok 4.5 matches GPT-5.6 Luna and beats Sonnet 5 and Terra. Add the token efficiency and the gap widens further. On a standard SWE-Bench Pro task, Grok 4.5 costs approximately $0.096 per resolved issue. Opus 4.8 at the same task costs approximately $1.00. The model does not need to win every benchmark to win your infrastructure bill.
Benchmarks: Better Than the Score Suggests
Grok 4.5 is not the frontier reasoning model in the room. On DeepSWE 1.1 it scores 53%, trailing Opus 4.8 at 59% and GPT-5.5 at 67%. On SWE-Bench Pro it hits 64.7% versus Opus 4.8’s 69.2%. Fable leads the field on both by a significant margin.
That said, Grok 4.5 wins on DeepSWE 1.0 (62.0% versus Opus 4.8’s 55.75%) and ties near the top of Terminal Bench 2.1 (83.3%). The pattern is consistent: it holds up on tasks that reward concise, direct code generation — and falls behind on problems requiring deep multi-step reasoning. As The Decoder noted, the benchmark gaps may not matter much when token efficiency is this good.
Use Fable or GPT-5.6 Sol when the task demands frontier reasoning and cost is secondary. Use Grok 4.5 when you are running hundreds or thousands of coding tasks at scale and the bill matters.
How to Connect in Three Lines
The xAI API is OpenAI-SDK-compatible. Point base_url at https://api.x.ai/v1, set your key, and swap the model name. No new SDK required.
from openai import OpenAI
import os
client = OpenAI(
api_key=os.getenv("XAI_API_KEY"),
base_url="https://api.x.ai/v1"
)
response = client.chat.completions.create(
model="grok-4.5",
messages=[{"role": "user", "content": "Your prompt here"}]
)
print(response.choices[0].message.content)
The model ID is grok-4.5. Aliases grok-4.5-latest and grok-build-latest are also supported. The context window is 500,000 tokens, with a higher rate tier above 200K. Capabilities include function calling with native parallel execution, structured outputs, vision, configurable reasoning_effort, web search, and streaming. For conversations, set a prompt_cache_key in the Responses API or pass the x-grok-conv-id header in Chat Completions to pin requests to the same server and improve cache hit rates. Full documentation is in the xAI quickstart guide.
Who Should Switch Now
If you are running a coding agent at scale — CI pipelines, automated code review, PR drafts, test generation — Grok 4.5 is worth testing today. The token efficiency means the math almost always favors it over Opus-class models for bulk workloads. Set up a shadow deployment, run a week of production traffic, and compare cost per resolved task before committing.
If your use case demands frontier reasoning — complex multi-step proofs, architecture-level design decisions, tasks requiring deep contextual understanding across a large codebase — stick with Fable or GPT-5.6 Sol for now. Grok 4.5 is not that model yet.
EU teams: access is delayed to mid-July. There is no workaround through the official API console. Plan around it.
What Comes Next
xAI has acknowledged that adding Cursor data in supplemental training is less effective than incorporating it from the start of pre-training. The next model in the Grok family is being built with Cursor data baked in from initial pre-training. If that holds, the next release should close the gap on multi-step coding benchmarks while keeping the token efficiency advantage. Watch the DeepSWE 1.1 score — that is where the improvement will show first.
For now, Grok 4.5 is a strong choice for cost-sensitive production agent workloads. Read the official xAI announcement and the Cursor integration details for full release notes.













