Back to Models
Grok 4.7
xaixai/grok-4.7
xAI Grok 4.7 with image input, reasoning, function calling and structured outputs.
Context Length
500K
Max Output
--
Input Priceper 1M tokens
$2.16/ 1M tokens
Output Priceper 1M tokens
$6.48/ 1M tokens
Modalities
textimageβtext
Capabilities
Vision
Pricing Breakdown
| Type | Rate |
|---|---|
| Prompts under 200K tokens | |
| Input | $2.16 / 1M tokens |
| Output | $6.48 / 1M tokens |
| Cached input | $0.540 / 1M tokens |
| Prompts of 200K tokens or more | |
| Input | $4.32 / 1M tokens |
| Output | $12.96 / 1M tokens |
| Cached input | $1.08 / 1M tokens |
Tiered pricing: when a request's prompt (input, cached tokens included) is 200K tokens or more, every token in that request is billed at the long-context rates.
Supported Parameters
temperaturemax_tokenstop_ptoolstool_choiceresponse_formatstop
API Usage Examples
Use the global api.therouter.ai endpoint shown below for new integrations; the legacy China accelerated endpoint is retired.
cURL
curl https://api.therouter.ai/v1/chat/completions -H "Content-Type: application/json" -H "Authorization: Bearer $THE_ROUTER_API_KEY" -d '{
"model": "xai/grok-4.7",
"messages": [
{"role": "user", "content": "Summarize the key points from this input."}
]
}'