8 min read

Grok 4.7 API: Should You Upgrade? Pricing and Benchmarks

Grok 4.7 API: Should You Upgrade? Pricing and Benchmarks

TL;DR

Grok 4.7 launched on September 21, 2026 under the stable model id grok-4.7. Official docs list a 500,000-token context window, text and image input, text output, and Standard API pricing of $2 per million input tokens and $6 per million output tokens below 200k prompt tokens. xAI reports stronger results than Grok 4.6 on longer coding and office-work evaluations at the same list price. A Fast variant exists only in Cursor and Grok Build at twice the token rates, and it is not on the public xAI API.

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

ItemOfficial specificationDeployment note
Release dateSeptember 21, 2026This article was checked on September 22, 2026
Stable model idgrok-4.7Use this exact string in API requests
Context window500,000 tokensRetrieval and context selection still matter
Long-context threshold200,000 prompt tokensThe whole request then bills at the higher rates
Knowledge cutoffMay 2026Fresh facts still need web search or X search
Input formatText and imagesOutput is text; image generation is a separate Imagine API
Reasoninglow, medium, high, xhighDefault is high; reasoning cannot be turned off
Built-in toolsFunction calling, web search, X search, code executionTool calls add their own fees
Batch APINot supportedDo not plan overnight evals on this model id
SurfacesxAI API, Cursor, Grok Build, gatewaysFast 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 typePrompt below 200k, per 1M tokensPrompt 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.

Official CursorBench 4.0 chart comparing Grok 4.7 with Fable 5.1, Opus 5, GPT-5.6 Sol and Sonnet 5 by 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.

Official Grok 4.7 table covering token prices and seven coding, office, legal and clinical evaluations 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: .

EvaluationGrok 4.7 xHighGrok 4.6 HighGPT-5.6 Sol MaxFable 5.1 Max
CursorBench 4.046.3%40.4%41.7%51.8%
DeepSWE v1.171.0%*65.2%72.7%70.0%
EEBench64.0%53.0%39.4%56.4%
AA Briefcase v1.11,6571,5461,4871,678
Terminal-Bench 4.038.0%20.3%37.3%57.9%
Harvey Legal Agent Benchmark19.6%15.8%2.5%6.7%
HealthBench Professional56.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.

Official GDPval chart comparing Grok 4.7 with Grok 4.6, Fable 5.1 and GPT-6 Astra 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.

Artificial Analysis summary card for Grok 4.7 xhigh showing Intelligence Index 46 and 81k tokens per task 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 evaluationGrok 4.7 xhighHow to read it
Intelligence Index46Composite of 10 evaluations; not an xAI score
AA Briefcase Elo1,657Matches xAI's Briefcase figure at the rounded integer
GDPval-AA1,695Matches xAI's GDPval chart
AutomationBench-AA65.6%AA agent-workflow score
Terminal-Bench 4.025.8%Below xAI's 38.0% launch figure
SciCode57.4%AA science-code score
Humanity's Last Exam43.1%AA HLE score
AA-Omniscience32.0Accuracy 47.5%, hallucination 29.3%
AA-LCR76.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.

bash
pip install -U xai-sdk
python
import osfrom xai_sdk import Clientfrom xai_sdk.chat import user
client = Client(api_key=os.environ["XAI_API_KEY"], timeout=3600)
chat = client.chat.create(model="grok-4.7")chat.append(user("Find and fix the bug, then explain it: function median(a){a.sort();return a[a.length/2]}"))response = chat.sample()print(response.content)

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.

python
import osfrom xai_sdk import Clientfrom xai_sdk.chat import user
client = Client(api_key=os.environ["XAI_API_KEY"], timeout=3600)
chat = client.chat.create(model="grok-4.7", reasoning_effort="xhigh")chat.append(user("Create a testable migration checklist for this API change."))response = chat.sample()print(response.content)

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 settingWhat Grok 4.7 expects
Model id grok-4.6grok-4.7
Reasoning offNot supported; default is high
reasoning_effort: xhighSupported, as on 4.6
Prompt cache unsetSet prompt_cache_key or x-grok-conv-id
Batch API jobsNot supported on 4.7
Prompts above 200kWhole request bills at $4 / $12
Fast trafficCursor or Grok Build only, 2x rates
Chat Completions tool loopsResponses 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

WorkloadTest Grok 4.7 firstKeep Grok 4.6 in the comparison
Long-running coding in Cursor or Grok BuildLaunch-day access and CursorBench gains are the point of the releaseThe current 4.6 workflow is stable and already meets the bar
Documents, slides and office agentsxAI and AA both show Briefcase and GDPval moving upOutputs are short and cheap on 4.6
Electrical or legal agent tasksOfficial EEBench and Harvey gaps over 4.6 are largeYou already have a specialist tool for that domain
Cost-sensitive batch workOnly if cache hits are reliable and prompts stay under 200k4.7 has no batch discount
Low-latency interactionTry low effort, or Fast inside Cursor / Grok BuildPublic API Fast does not exist
Production migrationCanary, rollback and task-level evaluation existThere 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:

  1. Whether the task finished and the final test passed.
  2. The number of follow-up prompts and manual edits.
  3. Input, cached-input, reasoning and output tokens, plus the full charge.
  4. Total tool calls, failed calls and repeated calls.
  5. P50 and P95 time to first token, response and completed task.
  6. Timeouts, rate limits, empty responses and schema parse failures.
  7. 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.

AI tools mentioned

MENGBI

Building with AI? Let’s talk.

Get listed on Mengbi, or access leading AI models through one API with better pricing.