Skip to main content
Comparison12 min readPublished: 2026-09-22Updated: 2026-09-22

Grok 4.7 API Guide: Pricing, Benchmarks, Context & Migration

Grok 4.7 is real, but the launch headlines need context. Check the model ID, 500K context, tiered API pricing, full benchmark table, safety claims, and independent evidence before migrating.

By Heizi· Founder & Editor· Published: 2026-09-22Official sources checked · 2026-09-22

Verification: Release details, model specifications, availability, pricing, benchmark settings, and safety claims were checked against SpaceXAI's announcement and documentation. Benchmark and safety figures in the launch table are vendor-reported unless an independent source is named.

Create a SpaceXAI API key

Use model ID grok-4.7 and verify the live price before sending production traffic.

Verification verdict: the release is real, the headline is incomplete

SpaceXAI released Grok 4.7 on September 21, 2026. The official announcement confirms a larger base model, longer reinforcement learning on harder multi-hour tasks, stronger answer verification and long-context behavior, better document and presentation work, native understanding of the Grok Bot harness, and a new safety stack.

The circulated article is broadly based on the official release, but two statements need correction. Grok 4.7 beats Grok 4.6 on every row in SpaceXAI's table; it does not beat every competing model on every row. The quoted $2 input and $6 output rates also apply only below the long-context threshold. Prompts at or above 200K input tokens are charged at higher rates.

  • Confirmed: September 21 release, model ID grok-4.7, 500K context window
  • Confirmed: $2/M input and $6/M output below 200K input tokens
  • Needs context: benchmark results are primarily vendor-run and use different reasoning-effort settings
  • Incorrect if read universally: Grok 4.7 does not lead every competitor on every listed benchmark
  • Marketing claim: 'twice as fast at half the price' is relative to unspecified comparable models

Grok 4.7 specifications and API availability

The public API model ID is grok-4.7. It accepts text and images, returns text, supports a 500,000-token context window, and has a May 2026 knowledge cutoff. Reasoning effort can be set to low, medium, high, or xhigh; high is the documented default.

SpaceXAI supports both the Responses API and Chat Completions API. Grok 4.7 can use function calling, web search, X search, and code execution. The model is also available in Cursor and Grok Build, but those products may use their own context limits and agent scaffolds.

Official Grok 4.7 model specifications
ItemGrok 4.7
API model IDgrok-4.7
Context window500,000 tokens
Knowledge cutoffMay 2026
ModalitiesText + image input; text output
Reasoning effortlow / medium / high / xhigh
APIsResponses and Chat Completions

What changed from Grok 4.6

SpaceXAI describes Grok 4.7 as a new, larger base model rather than a small tuning pass. Training focused on multi-hour coding and knowledge-work tasks, with more reinforcement learning and explicit work on answer verification. The company also highlights document and presentation workflows and better native behavior inside Grok Bot.

These changes matter most in long agent runs, where planning, tool use, and recovery from a bad intermediate step often matter more than a single-answer test. They do not guarantee a better result in every application, so a migration should be tested on complete workflows rather than isolated prompts.

Official benchmarks: ahead of 4.6, not ahead everywhere

Grok 4.7 scores above Grok 4.6 in all seven rows published by SpaceXAI. Against the two external comparison columns, the result is mixed: Fable 5.1 leads CursorBench, AA Briefcase, Terminal-Bench, and HealthBench; GPT-5.6 Sol leads DeepSWE; Grok 4.7 leads both on Harvey Legal and EEBench.

The table is not a perfectly controlled model-only comparison. Grok 4.7 is shown at xHigh on most rows, Grok 4.6 at High, and the competitors at Max. DeepSWE uses Grok 4.7 High. Agent harnesses, tool access, output budgets, and reasoning effort can all move the final score.

SpaceXAI-reported launch results; best score in each row varies by model
BenchmarkGrok 4.7Grok 4.6GPT-5.6 SolFable 5.1
CursorBench 4.046.3%40.4%41.7%51.8%
DeepSWE v1.171.0% (High)65.2%72.7%70.0%
AA Briefcase v1.11,6571,5461,4871,678
Terminal-Bench 4.038.0%20.3%37.3%57.9%
Harvey Legal Agent19.6%15.8%2.5%6.7%
HealthBench Professional56.7%48.5%60.5%62.1%
EEBench64.0%53.0%39.4%56.4%

What independent testing adds

Artificial Analysis measured an Intelligence Index score of 46 for Grok 4.7 xhigh, two points above Grok 4.6 high. Its Grok Build result reached 56 on the Coding Agent Index, placing fourth in that snapshot behind Fable 5.1, GPT-6 Astra, and Opus 5. This supports a real improvement, while stopping short of calling Grok 4.7 the universal leader.

The same evaluation found high output-token use: about 81,000 tokens per Intelligence Index task, versus roughly 36,000 for Grok 4.6 high. It also recorded both gains and regressions outside agentic knowledge work. XBOW's offensive-security tests were mixed and improved most when the model ran inside Grok Build, suggesting the model and its harness should be evaluated as a pair.

Grok 4.7 pricing: the missing long-context tier

For API requests below 200K input tokens, Grok 4.7 costs $2 per million input tokens, $0.50 per million cached input tokens, and $6 per million output tokens. Once the input reaches 200K tokens, all tokens in that request use the long-context rates: $4 input, $1 cached input, and $12 output per million tokens.

The Fast variant doubles throughput and uses higher prices, but it is available only in Cursor and Grok Build, not through the public SpaceXAI API. The US regional API endpoint carries a 10% premium. Tool usage and reseller pricing may add separate charges.

Price per 1M tokens; Fast is limited to Cursor and Grok Build
TierInputCached inputOutput
Standard, under 200K input$2$0.50$6
Standard, 200K+ input$4$1$12
Fast, under 200K input$4$1$12
Fast, 200K+ input$6$1.50$18

Call Grok 4.7 with the OpenAI JavaScript SDK

SpaceXAI exposes an OpenAI-compatible API. Set the base URL to https://api.x.ai/v1, keep the key in an environment variable, and send grok-4.7 as the model. The Responses API is the recommended starting point for new agent integrations.

javascript
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.XAI_API_KEY,
  baseURL: "https://api.x.ai/v1",
});

const response = await client.responses.create({
  model: "grok-4.7",
  input: "Review this migration plan and identify the two highest risks.",
});

console.log(response.output_text);

Minimal Grok 4.7 request using the Responses API.

Safety results are promising, but vendor-reported

SpaceXAI reports 62.4% on LatchBio's biosafety benchmark and says only 3.3% of risky dual-use prompts passed on HackerBench v0.3. The company calls Grok 4.7 its strongest model yet at refusing dangerous requests while preserving legitimate cybersecurity work, and is offering invite-only red-team access to selected security partners.

Those figures describe the vendor's evaluation, not a guarantee for every deployment. Applications handling security, healthcare, legal work, or biological information still need access controls, logging, human review, and application-specific red-team tests.

Who should test Grok 4.7 first

Teams running long coding agents, repository-wide analysis, document production, presentations, or tool-heavy research have the clearest reason to test Grok 4.7. Start with high effort, then compare xhigh only on tasks where the extra tokens and latency produce more accepted results.

Measure cost per accepted task rather than list price alone. Include input, output, cache hits, retries, tool fees, latency, and human review. Keep the previous model available until Grok 4.7 passes a representative regression set, especially if the current workflow depends on a specific agent harness.

FAQ

What is the Grok 4.7 API model ID?

Use grok-4.7 with the SpaceXAI Responses API or Chat Completions API.

How much does the Grok 4.7 API cost?

Below 200K input tokens, the public API costs $2/M input, $0.50/M cached input, and $6/M output. At 200K input tokens or more, the rates are $4, $1, and $12 respectively. Check the live pricing page before production use.

Does Grok 4.7 have a 500K context window?

Yes, the public SpaceXAI API documentation lists a 500,000-token context window. Cursor lists 256K standard context and 500K long context for its own integration.

Can I use Grok 4.7 Fast through the public API?

No. SpaceXAI says the Fast variant is currently limited to Cursor and Grok Build.

Is Grok 4.7 better than GPT-5.6 Sol or Fable 5.1?

Not across every task. In SpaceXAI's table Grok 4.7 leads both models on the legal and electrical-engineering tests, while the competitors lead several coding, terminal, office-work, and clinical-reasoning rows. Compare them on your own workflow and total cost.

Does Grok 4.7 support image input?

Yes. It accepts text and image input and returns text output.

Related Providers

Sources