Grok 4.6
xAITextReasoningToolsVision
xAI's Grok 4.6: the newest frontier model - long-running agents, coding and reasoning.
Our price
$1.70 / $5.10
input / output per 1M
Official
$2.00 / $6.00
−15% vs officialFirst request
from openai import OpenAI
client = OpenAI(
base_url="https://api.altrouter.ai/v1",
api_key="ar-...",
)
resp = client.chat.completions.create(
model="grok-4.6",
messages=[{"role": "user", "content": "Hello!"}],
)
print(resp.choices[0].message.content)API
OpenAI-compatible chat completions endpoint, with SSE streaming.
POST
/v1/chat/completionsBody parameters
Structured fields (tools, response_format, stop and more) are in the full parameter reference.
Response
Example
Errors