xAI
Grok 4.7: price, context window, and caching
xAI's top model for coding and knowledge work, which xAI says works longer on hard tasks and checks its own work more carefully.
Released September 21, 2026 · Prices as of September 28, 2026
In xAI’s words
“Grok 4.7 is our most capable model for coding and knowledge work.”
Facts
Specs and prices
| Fact | Grok 4.7 |
|---|---|
| Maker | xAI |
| API model id | grok-4.7 |
| Released | September 21, 2026 |
| Status | Current |
| Context window | 500K tokens |
| Max output | Not published |
| Open weights | No |
| Input, per 1M tokens | $2 |
| Cache hit, per 1M | $0.50 |
| Cache write, per 1M | $2 (same as input) |
| Output, per 1M tokens | $6 |
| Runs in | Cursor, OpenCode, OpenRouter, and GitHub Copilot |
Standard API rates in US dollars, as published by the maker on September 28, 2026. Batch and priority tiers, taxes, and subscription plans are not included. Grok 4.7: Once a prompt reaches 200K tokens, every token in the request costs $4 input, $1 cached, and $12 output per million. The US regional endpoint costs 10% more.
Good to know
- Cursor lists it as trained jointly by Cursor and xAI, and also offers a faster Grok 4.7 Fast at double the rates.
Cost
What typical work costs
Example token counts at Grok 4.7’s published rates. On the agentic session, caching saves $3.00 against billing every token as ordinary input.
| Agentic coding session, 100K input, 400K written to cache, 2M read from cache, 50K output | $2.30 |
|---|---|
| Large one-off review, 150K input with no cache hits, 10K output | $0.36 |
| Output-heavy generation, 30K input, 80K output | $0.54 |
| A month of sessions, 110 sessions: 5 a day, 22 working days | $253.00 |
Prompt caching
How xAI bills cached tokens
xAI
The xAI API caches repeated prompt prefixes automatically. Sending the same conversation id with each request raises the hit rate.
xAI lists no fee for writing the cache. A cache hit costs $0.50 per million tokens on Grok 4.7 and $0.20 on Grok Build 0.1.
Source: xAI docs: Prompt caching
Grok 4.7 compared
Grok 4.7 vs Claude Opus 5.5
Grok 4.7 costs $2.30 on a cached coding session against $4.40 on Claude Opus 5.5, but its window is 500K, not 1M, and prompts from 200K cost double.
Grok 4.7 vs Claude Sonnet 5
Grok 4.7 and Claude Sonnet 5 both charge $2 per million input tokens. A cached coding session costs $2.30 against $2.40, but output-heavy work splits wider.
Grok 4.7 vs Gemini 3.1 Pro Preview
Grok 4.7 and Gemini 3.1 Pro Preview both charge $2 input and raise rates at 200K tokens. Gemini costs less on a cached session, Grok on output-heavy work.
Grok 4.7 vs GPT-6 Sol
Grok 4.7 and GPT-6 Sol launched a day apart at $2 input. GPT-6 Sol wins a cached session, $2.10 to $2.30. Grok 4.7 wins uncached and output-heavy work.
Grok 4.7 vs Grok Build 0.1
Grok Build 0.1 costs $1.00 per cached coding session against $2.30 on Grok 4.7. Both follow xAI's caching and 200K rules; they differ on window and status.
Grok 4.7 vs Kimi K3
Grok 4.7 and Kimi K3 both run in Cursor and GitHub Copilot. Grok 4.7 costs less on every workload, while Kimi K3 adds open weights and a 1.05M window.
Your own numbers
See what Grok 4.7 really costs you.
everyaitoken reads your OpenRouter history on your Mac and prices every request at API rates, with what caching saved or cost. $9 once.