One agent session
1M input tokens and 100K output tokens, no caching.
- Input1M x $2 = $2.00
- Output0.1M x $6 = $0.60
$2.60per session
xAI - Closed weights
Grok 4.7 is a closed-weights model from xAI that costs $2 per 1M input tokens and $6 per 1M output tokens on the first-party API, with a 500K-token context window.
Last verified from docs.x.ai. All sources
| Item | Price / 1M tokens |
|---|---|
| InputPrompts up to 200,000 tokens | $2 |
| OutputPrompts up to 200,000 tokens | $6 |
| Cache readPrompts up to 200,000 tokens | $0.50 |
| Long-context inputPrompts over 200,000 tokens | $4 |
| Long-context outputPrompts over 200,000 tokens | $12 |
| Long-context cache readPrompts over 200,000 tokens | $1 |
Note: xAI docs are now branded SpaceXSI. Long-context rates apply to all tokens in a request once the prompt reaches 200k tokens (>= 200,000, not strictly above). max output is not stated because the release notes state 'no text output limit' rather than a number. Batch API is not supported on this model. No cache write charge is listed. Priority Processing bills 2x standard rates; the US regional endpoint (us.api.x.ai) bills 1.1x. Grok 4.7 Fast (2x standard, 1.5x long context: $4/$1/$12 below 200k, $6/$1.50/$18 above) is Cursor and Grok Build only, not on the public xAI API, so fast mode pricing is not stated. Text and image input, text output. Reasoning effort low/medium/high (default)/xhigh.
grok-4.7spacexai/grok-4.7Worked from the standard list rates above, with the math shown so you can swap in your own token counts. These use the base rates, which apply while each request's prompt stays at or under 200,000 tokens; above that, Grok 4.7 bills $4 input and $12 output for the whole request.
1M input tokens and 100K output tokens, no caching.
$2.60per session
10,000 requests a day at 2K input and 500 output tokens each.
$70.00per day
$2,100.00 per 30-day month
90% of the input is read from the prompt cache. The one-time cache write premium is not included.
$1.25per session
| Model | Input / 1M | Output / 1M |
|---|---|---|
| Grok 4.7 (this page) | $2 | $6 |
| Grok 4.5xAI | $2 | $6 |
| Grok 4.6xAI | $2 | $6 |
| Qwen3.8-2.4T-A95BAlibaba Cloud (Qwen) | $2 | $6 |
| Qwen3.8-MaxAlibaba Cloud (Qwen) | $2 | $6 |
| Grok 4.20xAI | $1.25 | $2.50 |
| Grok 4.20 (Non-Reasoning)xAI | $1.25 | $2.50 |
| Grok 4.20 Multi-Agent BetaxAI | $1.25 | $2.50 |
| Grok 4.3xAI | $1.25 | $2.50 |
Side-by-side pages with both models' prices, specs, cost examples and like-for-like benchmark rows.
Grok 4.7 costs $2 per 1M input tokens and $6 per 1M output tokens on xAI's first-party API, per docs.x.ai on October 17, 2026. Per 1M tokens, cache reads cost $0.50. Prompts over 200,000 tokens are billed at $4 input and $12 output for the whole request.
Grok 4.7 has a 500,000-token context window.
No. Grok 4.7 is a closed-weights model. You call it through xAI's API as grok-4.7 or through Vercel AI Gateway as spacexai/grok-4.7.
xAI released Grok 4.7 on September 21, 2026.
Last verified from docs.x.ai.
Newsletter
One email per week. New model releases, price cuts and what they mean for your bill.