xAI released Grok 4.7 on September 21, 2026, and it is available on the xAI API as grok-4.7. xAI’s developer release notes list it under September. xAI calls it its strongest model for coding and knowledge work. For developers, the main points are that it costs the same as Grok 4.6, keeps the same 500k context window, and is trained on a new, larger base model. This post covers what changed, what it costs, and what to check before you swap the model string.
What xAI says changed
According to xAI’s announcement, Grok 4.7 differs from Grok 4.6 in four ways:
- A new, larger base model. This is not a fine-tune of 4.6.
- A longer reinforcement-learning run on harder tasks, weighted toward problems that take many hours to finish. That fits xAI’s focus on agentic coding through Cursor and its own Grok Build agent.
- More checking of its own work, and better handling of long context.
- A new safety stack. xAI says it refuses harmful requests and resists jailbreaks better than its earlier models.
xAI published benchmark comparisons against Grok 4.6. Two examples: on CursorBench 4.0, xAI reports 46.3% for Grok 4.7 at its highest effort level, against 40.4% for Grok 4.6. On Terminal-Bench 4.0 it reports 37.6% against 20.3%. Treat these as the vendor’s own numbers. They tell you the direction, not how the model will do on your codebase. Ten of your own prompts with known good answers will tell you more.
The API details
From xAI’s models page and release notes:
grok-4.7 |
|
|---|---|
| Context window | 500k tokens |
| Input | Text and images |
| Output | Text |
| Reasoning effort | low, medium, high (default), xhigh |
| Price, prompt under 200k tokens | $2.00 input · $0.50 cached input · $6.00 output per 1M tokens |
| Price, prompt of 200k tokens or more | $4.00 input · $1.00 cached input · $12.00 output per 1M tokens |
| US regional endpoint | Available, billed at 1.1× standard rates |
Grok 4.6, released in August, has the same context window and the same price list on xAI’s models page. xAI’s announcement says 4.7 runs at the same price and speed as 4.6.
There is also a Grok 4.7 Fast variant. It is the same model served faster, at 2× the standard token rates (1.5× for long-context requests). According to the release notes it is available only in Cursor and Grok Build. It is not on the public xAI API, so you cannot call it from your own code.
Three things worth checking before you switch
1. The default effort is high
Reasoning effort defaults to high. If your code does not set an effort level, every request will spend reasoning tokens, and you are billed for reasoning tokens as output. For classification, extraction or short chat replies, a lower setting is usually cheaper and faster with little change in quality. For long agent runs, high or xhigh is where the reported gains come from. Measure both on your own workload. Don’t assume one setting fits every route in your app.
2. The price doubles at 200k tokens, for the whole request
The long-context rates apply to every token in the request once the prompt reaches 200k tokens, not just the tokens above the threshold. With a 500k window, agents that collect a lot of files and tool output can cross that line without anyone noticing. Here is what that means with xAI’s list prices:
# xAI list prices for grok-4.7 (USD per 1M tokens), from docs.x.ai on 2026-10-07.
# Once a prompt reaches 200k tokens, the higher rates apply to every token in that request.
STANDARD = {"input": 2.00, "cached": 0.50, "output": 6.00}
LONG = {"input": 4.00, "cached": 1.00, "output": 12.00}
THRESHOLD = 200_000
def request_cost(prompt_tokens, cached_tokens, output_tokens):
rates = LONG if prompt_tokens >= THRESHOLD else STANDARD
fresh = prompt_tokens - cached_tokens
return (
fresh * rates["input"]
+ cached_tokens * rates["cached"]
+ output_tokens * rates["output"]
) / 1_000_000
# Two requests that differ by 2,000 prompt tokens:
print(request_cost(199_000, 150_000, 8_000)) # 0.221
print(request_cost(201_000, 150_000, 8_000)) # 0.45Adding 2,000 prompt tokens roughly doubles the cost of that request. If your agent framework can compact or trim context, set the limit just under 200k tokens rather than at the full window.
3. Responses API calls always return encrypted reasoning
According to xAI’s release notes, grok-4.7 on the Responses API always returns reasoning.encrypted_content, even when your include parameter does not ask for it. That is an opaque blob you can pass back to keep reasoning state across turns. Two practical effects:
- Responses get larger. If you log full response bodies or store them in a database, check your size limits.
- Code that validates the response shape strictly, for example with a schema that rejects unknown fields, may need a change.
Chat Completions calls are not affected by this note.
Also in xAI’s September release notes
safety_identifier: a new request field for an opaque end-user ID, so xAI can attribute policy violations to one of your users instead of to your whole account. It works on Chat Completions, the Responses API, deferred completions, Batch and gRPC. If you run a multi-user product on xAI directly, send a hashed user ID. Never send an email address.- Retirements on the media side:
grok-voice-transcribe-1.0reached end of life on October 2, 2026, and requests now go to version 2.0 at the same price.grok-imagine-image-qualityretires on November 2, 2026. Neither affects text models.
Before upgrading, find every place your code names a Grok model:
# Find hardcoded Grok model IDs before you upgrade.
git grep -n -E "grok-4(\.[0-9])?" -- . ':!*.lock'What this means if you use Relaykit
Relaykit serves grok-4.7 at $2.20 input and $6.60 output per 1M tokens. The model page has the details.
If and when we add Grok 4.7, we will post it in Product Updates with its rate and the date it goes live, and the models page will list it. Some things in this post apply only if you call xAI directly. Grok 4.7 Fast and the US regional endpoint are xAI products, and the 200k price step is xAI’s list price, not ours. Our rates are on the models page.
Two points apply either way. Pin an exact model ID in your code instead of a moving alias, so an upgrade happens when you choose. And measure cost per finished task, not per token: a model that reasons longer but finishes in fewer agent steps can cost less overall.
Relaykit is an independent service and is not affiliated with xAI.