← All models

SpaceXAI: Grok 4.7NEW
x-ai/grok-4.7textVisionFilesReasoning
Grok 4.7 is SpaceXAI's flagship model for coding, agentic tasks, and knowledge work, succeeding Grok 4.6. It is particularly strong at long-running software engineering tasks, verifying its own work, and managing long context, and it improves on its predecessor at professional knowledge work such as drafting documents and presentations. The model was trained with a longer reinforcement learning run weighted toward problems that take many hours to complete. It ships with a new safeguard stack that pairs strong jailbreak resistance with low refusal rates for legitimate cybersecurity and biology work. Accepts images and files as input.
Price in / out
Cache, read / write
Context / Max output
500K / 450K
Released
Sep 21, 2026
Additional rates
Web search
Above 200K prompt tokens the upstream charges 2× more — per-route rates are in the table below.
Parameters
messagesrequiredreasoning_effortlow · medium · high · xhighmax_tokensoptional · alias max_completion_tokensstreamtrue · falsetoolsfunction calling (OpenAI format)tool_choiceauto · none · requiredresponse_formatjson_object · json_schemaweb_search · · · providerrouting: order · only · ignore · sortservice_tierprioritystream_options{"include_usage": true}image_urlimage (data: URL)filePDF · DOCX · TXT · CSV · XLSX · PPTX (data: URL)Fine-tuning · 5
temperature0–2seedoptionaltop_p0–1logprobstrue · falsetop_logprobs0–20How to use via API
from openai import OpenAI
client = OpenAI(base_url="https://api.mixen.ai/v1", api_key="mxn-...")
resp = client.chat.completions.create(
model="x-ai/grok-4.7",
messages=[{"role": "user", "content": "Привет"}],
reasoning_effort="low", # low · medium · high · xhigh
temperature=0.7,
max_tokens=1024,
stream=False,
)
print(resp.choices[0].message.content)
# Стриминг: stream=True — ответ приходит чанками
for chunk in client.chat.completions.create(
model="x-ai/grok-4.7",
messages=[{"role": "user", "content": "Привет"}],
stream=True,
):
print(chunk.choices[0].delta.content or "", end="", flush=True)
# с файлом (PDF · DOCX · TXT · CSV · XLSX · PPTX)
doc = client.chat.completions.create(
model="x-ai/grok-4.7",
messages=[{"role": "user", "content": [
{"type": "text", "text": "Кратко перескажи документ"},
{"type": "file", "file": {
"filename": "doc.pdf",
"file_data": "data:application/pdf;base64,JVBERi0...",
}},
]}],
)
