Grok 4.7
Grok 4.7 is SpaceXAI's flagship model for coding, agentic tasks, and knowledge work, succeeding Grok 4.6.
grok-4.7Released 21 Sep 2026 (8 weeks ago)Pricing
List prices at xAI, in US dollars per million tokens.
| Tier | Input / 1M | Output / 1M | |
|---|---|---|---|
| Standard | $2.00 | $6.00 | |
| Cached input 75% off input | $0.50 | 75% off input | |
| Batch 20% off | $1.60 | $4.80 | 20% off |
| Prompts over 200K tokens | $4.00 | $12.00 |
What it costs a month
At xAI list prices, 30 days.
- Chat assistant5,000 requests a day, 2K in / 0.5K out, cached$915
- RAG over documents2,000 requests a day, 8K in / 0.6K out, cached$816
- Coding agent1,000 requests a day, 40K in / 2K out, cached$1,500
- Overnight batch20,000 requests a day, 4K in / 0.4K out, batch$4,992
Where to run it
8 hosts serve Grok 4.7. The comparison is on blended price, 3 parts input to 1 part output.
| Host | In / out per 1M | Model id | |
|---|---|---|---|
xAILab API grok-4.7 | $2.00 / $6.00 | grok-4.7 | |
| $2.00 / $6.00 | global.xai.grok-4.7 | ||
Azure AI FoundryCloud grok-4.7 | $2.00 / $6.00 Retires 5 Oct 2027 | grok-4.7 | Retires 5 Oct 2027 |
OpenCode GoCloud grok-4.7 | $2.00 / $6.00 | grok-4.7 | |
Vertex AICloud grok-4.7 | $2.00 / $6.00 | grok-4.7 | |
PerplexityGateway grok-4.7 | $2.00 / $6.00 | grok-4.7 | |
Kyma APICloud grok-4.7 | $2.16 / $6.48 +8% vs headline | grok-4.7 | |
DatabricksCloud databricks-grok-4-7 | $2.50 / $7.50 +25% vs headline | databricks-grok-4-7 | |
GitHub CopilotSubscription grok-4.7 | In the subscription | grok-4.7 |
Show 5 more listings: regions, snapshots and variantsHide regional listings
| Amazon Bedrock | |||||||
| Mantle xai.grok-4.7 | $2.20 / $6.60 +10% vs headline | xai.grok-4.7 | |||||
| us us.xai.grok-4.7 | $2.20 / $6.60 +10% vs headline | us.xai.grok-4.7 | |||||
| us-gov-east-1 · Mantle xai.grok-4.7 | $2.64 / $7.92 +32% vs headline | xai.grok-4.7 | |||||
| us-gov-west-1 · Mantle xai.grok-4.7 | $2.64 / $7.92 +32% vs headline | xai.grok-4.7 | |||||
| us-gov us-gov.xai.grok-4.7 | $2.64 / $7.92 +32% vs headline | us-gov.xai.grok-4.7 | |||||
Capabilities
Core
- Streaming
- Function calling
- JSON mode
- Structured outputs
Multimodal
- Vision
- Image input
- Audio
- Image generation
- Video
Advanced
- Reasoning
- Tool calling
- MCP
- Prompt caching
- Batch API
- Embeddings
- Takes in
- TextImages
- Produces
- Text
- Features
- Prompt cachingBuilt-in web search
Cheaper alternatives
Current models that cost less and keep most of what this one can do: tools, vision, reasoning, structured output, caching and enough context.
Same model, cheaper host
No host sells it for less than xAI.
Smaller xAI models
- 58% less
- 48% less
- 48% less
Other frontier labs
- 33% less
- 50% less
- 93% less
- 44% less
Open-weight picks
- 29% less
- 43% less
- 77% less
- 83% less
Model line
Newer and older versions, at each lab's own price.
Call it
Using xAI's API.
import os
from openai import OpenAI
client = OpenAI(base_url="https://api.x.ai/v1", api_key=os.environ["XAI_API_KEY"])
completion = client.chat.completions.create(
model="grok-4.7",
messages=[{"role": "user", "content": "Hello"}],
)
print(completion.choices[0].message.content)from litellm import completion
response = completion(
model="xai/grok-4.7",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)Quick answers
How much does Grok 4.7 cost?
On xAI, Grok 4.7 costs $2.00 per million input tokens and $6.00 per million output tokens. Cached input costs $0.50 per million tokens.
Which APIs offer Grok 4.7?
Grok 4.7 runs on 8 APIs: xAI, Amazon Bedrock, Azure AI Foundry, OpenCode Go, Vertex AI, Perplexity, Kyma API and Databricks.
What is Grok 4.7's context window?
500K tokens, with up to 500K tokens in one reply.
Is Grok 4.7 being retired?
Azure AI Foundry retires it on 5 Oct 2027. 7 hosts keep serving it.
Is there a newer version of Grok 4.7?
No. Grok 4.7 is the newest model in its line.
What are cheaper alternatives to Grok 4.7?
Models that cost less and keep most of what it can do: Grok Build 0.1 on xAI (58% less), GPT-6.1 Terra on OpenAI (33% less), Gemini 3.8 Flash on Google AI Studio (50% less) and Qwen4 Max on Together AI (29% less). Savings are on a mix of 3 input tokens to 1 output token.
When was Grok 4.7 released?
xAI released it on 21 Sep 2026.
What is Grok 4.7's API model id?
Use grok-4.7 with xAI. Other hosts use their own ids: global.xai.grok-4.7 on Amazon Bedrock, databricks-grok-4-7 on Databricks.
Sources
- Databricks pricing
- Amazon Bedrock pricing
- Azure AI Foundry pricing
- GitHub Copilot pricing
- OpenCode Go pricing
- Perplexity pricing
- Vertex AI pricing
- xAI pricing
- LiteLLM model map
Raw catalog entry for grok-4.7 on xAI
{
"cache_read_input_token_cost": 5e-7,
"cache_read_input_token_cost_above_200k_tokens": 0.000001,
"cache_read_input_token_cost_above_200k_tokens_batches": 8e-7,
"cache_read_input_token_cost_batches": 4e-7,
"input_cost_per_image_token": 0.000002,
"input_cost_per_token": 0.000002,
"input_cost_per_token_above_200k_tokens": 0.000004,
"input_cost_per_token_above_200k_tokens_batches": 0.0000032,
"input_cost_per_token_batches": 0.0000016,
"litellm_provider": "xai",
"max_input_tokens": 500000,
"max_output_tokens": 500000,
"mode": "chat",
"output_cost_per_token": 0.000006,
"output_cost_per_token_above_200k_tokens": 0.000012,
"output_cost_per_token_above_200k_tokens_batches": 0.0000096,
"output_cost_per_token_batches": 0.0000048,
"source": "https://api.x.ai/v1/language-models",
"supports_function_calling": true,
"supports_prompt_caching": true,
"supports_reasoning": true,
"supports_response_schema": true,
"supports_tool_choice": true,
"supports_vision": true,
"supports_web_search": true
}