Official Grok 4.7 launch artwork. Source: .
The Grok 4.7 API launched on September 21, 2026 with the stable model id grok-4.7. Official documentation lists a 500,000-token context window, text and image inputs, text output, configurable reasoning, function calling, web search, X search and code execution.
The release is less about a new headline window than a change in how xAI prices a stronger coding model. Grok 4.7 uses the same $2 / $6 token rates as Grok 4.6. xAI says it works longer on hard jobs, checks its own work more carefully and sits on the CursorBench 4.0 price-performance frontier. Buyers should keep those claims apart: the published rates are first-party prices; the benchmark wins are vendor-reported under named settings.
A second confusion is circulating around context size. Older Grok 4.20 and Grok 4.1 Fast pages still mention a 2 million token window. Grok 4.7 does not. The current model page and pricing table both say 500k tokens, with a higher rate once a prompt reaches 200k.
This guide separates model facts, xAI-reported evaluations, independent Artificial Analysis scores and migration risks so you can decide what to test. Mengbi did not run paid Grok 4.7 API tests for this article.
Grok 4.7 API at a glance
| Item | Official specification | Deployment note |
|---|---|---|
| Release date | September 21, 2026 | This article was checked on September 22, 2026 |
| Stable model id | grok-4.7 | Use this exact string in API requests |
| Context window | 500,000 tokens | Retrieval and context selection still matter |
| Long-context threshold | 200,000 prompt tokens | The whole request then bills at the higher rates |
| Knowledge cutoff | May 2026 | Fresh facts still need web search or X search |
| Input format | Text and images | Output is text; image generation is a separate Imagine API |
| Reasoning | low, medium, high, xhigh | Default is high; reasoning cannot be turned off |
| Built-in tools | Function calling, web search, X search, code execution | Tool calls add their own fees |
| Batch API | Not supported | Do not plan overnight evals on this model id |
| Surfaces | xAI API, Cursor, Grok Build, gateways | Fast is not on the public API |
The specification comes from xAI's and the . The model can inspect images, but it returns text. If a workflow needs pictures or video, connect Imagine rather than expecting grok-4.7 to draw.
A 500k window helps with large repositories, long sessions and document packs. Production systems should still retrieve, cache and trim context, because longer inputs raise latency and cost. The 200k threshold matters more than the headline window: once a prompt crosses it, every token in that request is billed at the long-context rates.
Where Grok 4.7 is rolling out
The launch covers chat-adjacent coding surfaces, the public API and some gateways, but the schedule is not identical on every product.
Cursor is named on the launch post as available today on all plans. That is the shortest path for an IDE user who already pays Cursor and wants the new model without standing up an xAI key.
Grok Build uses Grok 4.7 as its default coding-agent model. xAI also points people to a free trial at . The Fast variant is excluded from that free tier.
The xAI API uses the model name grok-4.7. Docs recommend the Responses API for new work and still document Chat Completions. On Responses, grok-4.7 always returns reasoning.encrypted_content, even when include does not list it. Pass those reasoning items back unchanged if you manage history yourself.
The US regional endpoint keeps inference in the United States and is billed at 1.1 times the global rates. Docs currently list grok-4.7 and grok-4.6 there. See xAI's .
Model gateways named in the docs include OpenRouter, Vercel and Cloudflare. Those listed prices are not the same as xAI's first-party table. Treat a gateway quote as a gateway quote.
For most product integrations, start with grok-4.7 on the public xAI API. Cursor's Fast option, Grok Build's free-tier limits and regional residency need their own checks.
Grok 4.7 API pricing
xAI prices the model by input, cached input and output tokens. The official also splits short-context and long-context rates.
| Token type | Prompt below 200k, per 1M tokens | Prompt at or above 200k, per 1M tokens |
|---|---|---|
| Input | $2.00 | $4.00 |
| Cached input | $0.50 | $1.00 |
| Output | $6.00 | $12.00 |
Once a prompt reaches 200k tokens, the long-context column applies to all tokens in that request, not only the overflow.
Suppose one repository task sends 1 million uncached input tokens and generates 200,000 output tokens, all below the long-context threshold. The model charge is about $3.20: $2.00 for input and $1.20 for output. If the same input hits cache, the token mix is about $1.70. Search, X search and code execution are extra.
A shorter prompt can still cost more if it crosses 200k. A 250,000-token prompt plus 200,000 output tokens bills at the long-context rates: about $3.40. That is why the 200k line is an operations issue, not a footnote.
Grok 4.7 Fast is the same model on faster infrastructure, billed at twice the standard rates. Below 200k prompt tokens that is $4.00 / $1.00 / $12.00. Above 200k it is $6.00 / $1.50 / $18.00. Docs are explicit: Fast is available only in Cursor and Grok Build, it is not on the public xAI API, and Grok Build's free tier does not include it.
Priority processing is a separate 2x multiplier for lower-latency scheduling on Chat Completions and Responses. You are billed at that premium only when the response confirms "service_tier": "priority".
US regional requests add a 10% premium. For grok-4.7 below 200k that is $2.20 / $0.55 / $6.60 per million tokens.
Grok 4.7 is not in the Batch discount table. Models that do get a batch cut today are older 4.3 and 4.20 ids. Do not assume overnight eval jobs will be cheaper on grok-4.7.
OpenRouter listed $1.60 / $4.80 per million input and output tokens, with $0.40 cache reads, when this article was checked. That is a gateway list, not xAI's official $2 / $6 table. OpenRouter's own weighted averages on the same page were about $0.74 input and $8.47 output per million tokens, which already shows how cache hits and output mix move a real bill.
xAI also says Grok 4.7 is "twice as fast, at half the price of comparable models." That line is launch positioning against the comparison set on its chart, not a universal invoice ratio against every frontier model.
What the Grok 4.7 benchmarks show
xAI's launch table compares Grok 4.7 xHigh with Grok 4.6 High, GPT-5.6 Sol Max and Fable 5.1 Max. The company also published a CursorBench 4.0 scatter of score against average cost per task.
On CursorBench 4.0, xAI places Grok 4.7 Extra High at 46.3% and $6.01 average cost per task. Fable 5.1 Max is higher at 51.8% and $17.28. Source: .
The scatter is the useful launch argument. Grok 4.7 Extra High sits near Fable 5.1 Medium and Opus 5 Medium on score, at a lower average task cost than Fable Max or Opus Max. It does not sit at the top of the score axis. Fable 5.1 Max remains the highest bar on that chart.
xAI's launch table retains the original benchmark labels, footnotes and comparison models. An asterisk on Grok 4.7 DeepSWE marks a high-effort score. Source: .
| Evaluation | Grok 4.7 xHigh | Grok 4.6 High | GPT-5.6 Sol Max | Fable 5.1 Max |
|---|---|---|---|---|
| CursorBench 4.0 | 46.3% | 40.4% | 41.7% | 51.8% |
| DeepSWE v1.1 | 71.0%* | 65.2% | 72.7% | 70.0% |
| EEBench | 64.0% | 53.0% | 39.4% | 56.4% |
| AA Briefcase v1.1 | 1,657 | 1,546 | 1,487 | 1,678 |
| Terminal-Bench 4.0 | 38.0% | 20.3% | 37.3% | 57.9% |
| Harvey Legal Agent Benchmark | 19.6% | 15.8% | 2.5% | 6.7% |
| HealthBench Professional | 56.7% | 48.5% | 60.5% | 62.1% |
* xAI marks DeepSWE as high effort for Grok 4.7.
The table does not say the model wins every row. GPT-5.6 Sol Max is ahead on DeepSWE. Fable 5.1 Max is ahead on CursorBench, Briefcase, Terminal-Bench and HealthBench. Grok 4.7's clearest official gains over Grok 4.6 are CursorBench, EEBench, Briefcase, Terminal-Bench and Harvey. Those numbers are still xAI-reported under the effort labels in the header.
xAI's GDPval panel lists Grok 4.7 xHigh at 1695, behind Fable 5.1 Max at 1735 and ahead of Grok 4.6 High at 1605. Source: .
The company also reports a new safeguard stack, 62.4% on LatchBio's biosafety benchmark, and 3.3% of risky dual-use prompts passing HackerBench v0.3. Those are vendor safety scores, not a substitute for your own policy, logging and human review.
A better internal test uses 30 to 100 representative tasks and records final test pass rate, human correction count, tool turns, input and output tokens, timeouts and full cost. A model that reasons for many tokens can be more expensive in bulk even when its list price looks low.
Independent tests: Artificial Analysis
Artificial Analysis publishes a separate Intelligence Index that does not copy xAI's launch table. On 22 September 2026 its scored the model 46 on Intelligence Index v4.3.2, rank 16 of 655. The same page listed a 500k context window, text and image input, and text output.
Independent summary from Artificial Analysis. Speed and cost were shown as unavailable on the opengraph card when this article was checked. Source: .
The page also reports that the Intelligence Index run used about 240 million output tokens, which AA calls very verbose against a median of 92 million. In the page payload, Grok 4.7 xhigh used about 80,561 output tokens per Index task, including about 58,544 reasoning tokens.
Selected AA scores from that same model object, rounded for reading:
| AA evaluation | Grok 4.7 xhigh | How to read it |
|---|---|---|
| Intelligence Index | 46 | Composite of 10 evaluations; not an xAI score |
| AA Briefcase Elo | 1,657 | Matches xAI's Briefcase figure at the rounded integer |
| GDPval-AA | 1,695 | Matches xAI's GDPval chart |
| AutomationBench-AA | 65.6% | AA agent-workflow score |
| Terminal-Bench 4.0 | 25.8% | Below xAI's 38.0% launch figure |
| SciCode | 57.4% | AA science-code score |
| Humanity's Last Exam | 43.1% | AA HLE score |
| AA-Omniscience | 32.0 | Accuracy 47.5%, hallucination 29.3% |
| AA-LCR | 76.7% | Long-context reasoning |
The Terminal-Bench gap is the one not to flatten. xAI published 38.0% for Grok 4.7 xHigh. AA's independently run Terminal-Bench 4.0 result in the same page payload is 25.8%. Different runners, tools, time limits and effort settings can move that number. Treat both as observations under their own methods, not as proof that one lab miscounted.
AA's public summary also showed $0.00 input and output prices and N/A speed when checked. Do not read those zeros as a free model. They mean the live pricing fields were empty on that card. Use xAI's table or your gateway invoice instead.
OpenRouter's activity snapshot on launch week already showed coding-agent traffic, including Pi and Codex clients sending tens of millions of tokens. That is evidence of early routing demand, not a quality ranking.
How to call the Grok 4.7 API
Create a key in the and store it in the server environment variable XAI_API_KEY. The official Python example uses the xAI SDK. The also show an OpenAI-compatible client.
Do not put the key in a browser bundle, a public repository or a frontend environment variable. The server should log request ids, token use, reasoning tokens, tool-call counts, latency and stop reasons, and cap retries plus total agent turns.
To raise reasoning strength, set reasoning.effort to xhigh. The default is high. Reasoning cannot be disabled, and presencePenalty, frequencyPenalty and stop return errors on this model.
xAI highly recommends a prompt_cache_key on Responses, or the x-grok-conv-id header on Chat Completions. That routes a conversation to the same server so cache hits are reliable. Without it, later turns often miss cache and pay full input price. Long agent loops also benefit from .
A successful text request is not a production agent. Web search, X search and code execution add per-call fees. The client still has to handle tool results, encrypted reasoning items and failed retries.
Migrating from Grok 4.6 to Grok 4.7
If the current request only sends model and a text prompt, start by swapping the id to grok-4.7. The list price does not change. The bill still can, because output tokens, reasoning tokens and tool turns may move.
| Current setting | What Grok 4.7 expects |
|---|---|
Model id grok-4.6 | grok-4.7 |
| Reasoning off | Not supported; default is high |
reasoning_effort: xhigh | Supported, as on 4.6 |
| Prompt cache unset | Set prompt_cache_key or x-grok-conv-id |
| Batch API jobs | Not supported on 4.7 |
| Prompts above 200k | Whole request bills at $4 / $12 |
| Fast traffic | Cursor or Grok Build only, 2x rates |
| Chat Completions tool loops | Responses keeps encrypted reasoning without extra include |
Do not move all production traffic first. Begin with shadow requests or a 5% to 10% canary and compare 4.6 with 4.7 on completion rate, output length, tool errors and total spend. Expand only after rollback, timeout handling and usage logs have been checked.
The change in agent behavior can be easy to misread. A longer self-check may look slower while raising the chance a job finishes. Measure the cost and time needed to reach the accepted business result, not only latency for one response.
Grok 4.7 vs Grok 4.6
| Workload | Test Grok 4.7 first | Keep Grok 4.6 in the comparison |
|---|---|---|
| Long-running coding in Cursor or Grok Build | Launch-day access and CursorBench gains are the point of the release | The current 4.6 workflow is stable and already meets the bar |
| Documents, slides and office agents | xAI and AA both show Briefcase and GDPval moving up | Outputs are short and cheap on 4.6 |
| Electrical or legal agent tasks | Official EEBench and Harvey gaps over 4.6 are large | You already have a specialist tool for that domain |
| Cost-sensitive batch work | Only if cache hits are reliable and prompts stay under 200k | 4.7 has no batch discount |
| Low-latency interaction | Try low effort, or Fast inside Cursor / Grok Build | Public API Fast does not exist |
| Production migration | Canary, rollback and task-level evaluation exist | There is no reliable acceptance set or usage monitoring |
xAI has not announced a shutdown date for Grok 4.6 in this launch post. Keep 4.6 as a rollback and efficiency control instead of retiring it only to follow the newest version.
If the model will sit inside an IDE or terminal workflow, see our . For a contemporaneous OpenAI flagship, see . For Anthropic's long-running agent model, see . You can also .
How to evaluate Grok 4.7 before launch
A reusable scorecard should record at least these fields:
- Whether the task finished and the final test passed.
- The number of follow-up prompts and manual edits.
- Input, cached-input, reasoning and output tokens, plus the full charge.
- Total tool calls, failed calls and repeated calls.
- P50 and P95 time to first token, response and completed task.
- Timeouts, rate limits, empty responses and schema parse failures.
- Safety refusals, factual errors and whether cited answers can be checked.
Do not build the set only from successful demos. Include ambiguous requests, dead links, oversized files, tool errors, duplicated function results and mobile screenshots. Keep the input, acceptance script and human scoring rule fixed for each item. Otherwise the test compares prompts rather than model versions.
xAI still says Grok has no knowledge of current events without search tools. Medical, legal, financial, privileged-action and cybersecurity workflows still require human review and system-level access controls. Invite-only red-team access mentioned in the launch post is not a public API feature.
Frequently Asked Questions
When was Grok 4.7 released?
xAI published Grok 4.7 on September 21, 2026. Developers can use the stable grok-4.7 model through the xAI API, Cursor, Grok Build and some model gateways.
How much does the Grok 4.7 API cost?
Official Standard pricing below 200k prompt tokens is $2.00 per million input tokens, $0.50 per million cached-input tokens and $6.00 per million output tokens. At or above 200k prompt tokens the rates are $4.00, $1.00 and $12.00. Gateway list prices can differ.
What is the Grok 4.7 context window?
Official docs list 500,000 tokens. That is not the 2 million token window advertised on some older Grok 4.20 and Grok 4.1 Fast pages. Prompts at or above 200k tokens also trigger higher rates.
Can Grok 4.7 inspect images?
Yes. It accepts text and image input and returns text. It does not generate images. Use the Imagine API for image or video output.
Does Grok 4.7 work with the OpenAI SDK?
Yes. xAI documents an OpenAI-compatible client in its . Use your xAI key and model grok-4.7. Test streaming, tool calls, encrypted reasoning and errors before launch.
Is Grok 4.7 Fast on the public API?
No. Fast is the same model on faster infrastructure at twice the token rates, and docs limit it to Cursor and Grok Build. It is not in Grok Build's free tier.
Should every Grok 4.6 workload upgrade now?
No. Put 4.7 into tests for longer coding jobs, office-document agents and tasks where 4.6 already fails. Keep 4.6 where it meets requirements or uses fewer tokens, then canary the new model against task success, latency and full cost.
Sources and verification notes
Model specifications, prices, migration steps and vendor benchmark numbers in this article come from xAI sources:
Independent and gateway observations come from and , checked on September 22, 2026. The UI charts come from xAI's launch page and are included for commentary with attribution. Mengbi did not rerun the evaluations with a paid API key and received no sponsorship from xAI. Pricing, model status and gateway rates can change, so check the official pages before a purchase or production rollout.
Last verified: September 22, 2026.

