Grok 4.7 is SpaceXAI's flagship model for coding, agentic tasks, and knowledge work, succeeding Grok 4.6. Particularly strong at long-running software engineering and verifying its own work. Multimodal input (text, image, file), 500K-token context, up to 450K output tokens, reasoning with configurable effort, tools and structured outputs.
Grok 4.7 is SpaceXAI's flagship model, succeeding Grok 4.6, for coding, agentic tasks and knowledge work. It is particularly strong at long-running software engineering and at verifying its own work…
Multimodal input (text, images and files) with text output, a 500K-token context window and an unusually large output budget of up to 450K tokens. Supports reasoning with configurable effort, function calling / tools, structured (JSON) outputs, temperature, seed and logprobs.
Pricing is tiered by prompt size: the standard rate applies up to 200K input tokens and steps up beyond it. Cached input reads are billed at a reduced rate. See the pricing on this page for the current numbers.
POST /v1/chat/completions (or /v1/responses) with model grok/grok-4.7 through your OrcaRouter API key — any OpenAI SDK works by setting the base URL to OrcaRouter. Supports tools / function calling, response_format for structured outputs, and reasoning_effort to tune depth. Errors use the OpenAI error envelope.
OpenAI-compatible — keep the SDK you already use
https://api.orcarouter.ai/v1import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.orcarouter.ai/v1",
api_key=os.environ["ORCAROUTER_API_KEY"],
)
response = client.chat.completions.create(
model="grok/grok-4.7",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)include_reasoninglogprobsmax_tokensreasoningreasoning_effortresponse_formatseedstructured_outputstemperaturetool_choicetoolstop_logprobstop_p| Tier | Input / 1M tokens | Output / 1M tokens | Cache read / 1M |
|---|---|---|---|
| ≤ 200K | $2.00 | $6.00 | $0.500 |
| ≤ ∞ | $4.00 | $12.00 | $1.00 |
| Tier selected by input token count of each request | |||
Estimate based on list price
Tiered pricing — this estimate uses base-tier rates.
Estimate only — actual token counts depend on the provider's tokenizer.
What developers are saying this week
@misc{orcarouter_grok_4_7,
title = {Grok 4.7 API},
author = {grok},
year = {2026},
howpublished = {OrcaRouter},
url = {https://www.orcarouter.ai/models/grok/grok-4.7}
}grok. (2026). Grok 4.7 API. OrcaRouter. https://www.orcarouter.ai/models/grok/grok-4.7