Grok 4.7
by xai · family grok
Facts
| Release date | 2026-09-21 |
|---|---|
| Retired date | — |
| Knowledge cutoff | — |
| Context (max) | 500,000 |
| Max output | 450,000 |
| Modalities | text, image → text |
| Aliases | grok-4.7 |
| Open weights | no |
| Description | xAI's flagship (Sep 21, 2026), succeeding Grok 4.6: 500K context with up to 450K output, strong at long-running software engineering with self-verification. $1.60/$4.80 per Mtok on OpenRouter (xAI list $2/$6 up to 200K, $4/$12 above); reasoning_effort control per the 4.5+ line. |
Unknown values are shown as —.
Offerings
| Provider | Wire ID | Variant | Endpoint | Protocol | Status | Price (USD / Mtok) | Reasoning |
|---|---|---|---|---|---|---|---|
| NEAR AI Cloud | x-ai/grok-4.7 | chat | openai-chat | ga | 2.00 / 6.00 | effort · default on · returns reasoning_content | |
| OpenCode Go | grok-4.7 | go-chat-completions | openai-chat | ga | — | effort · default on · returns reasoning_content · round-trips reasoning_content | |
| OpenCode Zen | grok-4.7 | responses | openai-responses | ga | 2.00 / 6.00 | effort · default on · returns reasoning_summary · round-trips encrypted_content | |
| OpenRouter | x-ai/grok-4.7 | chat-completions | openai-chat | ga | 1.60 / 4.80 | effort · default on · returns reasoning_content · round-trips reasoning_content |
Reasoning controls
NEAR AI Cloud· x-ai/grok-4.7· chat effort
reasoning_effort low●mediumhighxhigh
effort · default on · returns reasoning_content
OpenCode Go· grok-4.7· go-chat-completions effort
reasoning.effort low●mediumhighxhigh
effort · default on · returns reasoning_content · round-trips reasoning_content
OpenCode Zen· grok-4.7· responses effort
reasoning.effort low●mediumhighxhigh
effort · default on · returns reasoning_summary · round-trips encrypted_content
Incompatible with: temperature, top_p
OpenRouter· x-ai/grok-4.7· chat-completions effort
reasoning.effort low●mediumhighxhigh
effort · default on · returns reasoning_content · round-trips reasoning_content
Example requests
NEAR AI Cloud · openai-chat · x-ai/grok-4.7
curl 'https://cloud-api.near.ai/v1/chat/completions' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "x-ai/grok-4.7",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning_effort": "low"
}'Python (requests)
import requests
resp = requests.post(
"https://cloud-api.near.ai/v1/chat/completions",
headers={
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
json={
"model": "x-ai/grok-4.7",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning_effort": "low"
},
)
print(resp.json())TypeScript (fetch)
const resp = await fetch("https://cloud-api.near.ai/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "x-ai/grok-4.7",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning_effort": "low"
}),
})
console.log(await resp.json())OpenCode Go · openai-chat · grok-4.7
curl 'https://opencode.ai/zen/go/v1/chat/completions' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "grok-4.7",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning": {
"effort": "low"
}
}'Python (requests)
import requests
resp = requests.post(
"https://opencode.ai/zen/go/v1/chat/completions",
headers={
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
json={
"model": "grok-4.7",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning": {
"effort": "low"
}
},
)
print(resp.json())TypeScript (fetch)
const resp = await fetch("https://opencode.ai/zen/go/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "grok-4.7",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning": {
"effort": "low"
}
}),
})
console.log(await resp.json())- ⚠ Responses include
reasoning_contentartifacts — pass them back unmodified on subsequent turns (dropping them triggers 400s or quality loss).
OpenCode Zen · openai-responses · grok-4.7
curl 'https://opencode.ai/zen/v1/responses' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "grok-4.7",
"input": "Tell me about the weather.",
"reasoning": {
"effort": "low"
}
}'Python (requests)
import requests
resp = requests.post(
"https://opencode.ai/zen/v1/responses",
headers={
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
json={
"model": "grok-4.7",
"input": "Tell me about the weather.",
"reasoning": {
"effort": "low"
}
},
)
print(resp.json())TypeScript (fetch)
const resp = await fetch("https://opencode.ai/zen/v1/responses", {
method: "POST",
headers: {
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "grok-4.7",
"input": "Tell me about the weather.",
"reasoning": {
"effort": "low"
}
}),
})
console.log(await resp.json())- ⚠ Responses include
encrypted_contentartifacts — pass them back unmodified on subsequent turns (dropping them triggers 400s or quality loss). - Reported incompatible with thinking controls: temperature, top_p.
OpenRouter · openai-chat · x-ai/grok-4.7
curl 'https://openrouter.ai/api/v1/chat/completions' \
-H 'Authorization: Bearer <YOUR_API_KEY>' \
-H 'Content-Type: application/json' \
-d '{
"model": "x-ai/grok-4.7",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning": {
"effort": "low"
}
}'Python (requests)
import requests
resp = requests.post(
"https://openrouter.ai/api/v1/chat/completions",
headers={
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
json={
"model": "x-ai/grok-4.7",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning": {
"effort": "low"
}
},
)
print(resp.json())TypeScript (fetch)
const resp = await fetch("https://openrouter.ai/api/v1/chat/completions", {
method: "POST",
headers: {
"Authorization": "Bearer <YOUR_API_KEY>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"model": "x-ai/grok-4.7",
"messages": [
{
"role": "user",
"content": "Tell me about the weather."
}
],
"reasoning": {
"effort": "low"
}
}),
})
console.log(await resp.json())- ⚠ Responses include
reasoning_contentartifacts — pass them back unmodified on subsequent turns (dropping them triggers 400s or quality loss).