xAI Grok models and an extended set of vendor-prefixed chat IDs use the same
Bearer token and OpenAI SDK configuration as Gemini, GPT and Claude. Always
send the exact model id returned by your token's GET /v1/models response.
Grok (xAI)
grok-4.7 is the canonical current xAI flagship. It is available on
POST /v1/chat/completions and POST /v1/responses, including streaming.
It accepts text and image input and produces text, function calls, or
structured JSON output. On the Responses API, send the complete input context;
previous_response_id continuation is not enabled for this route yet.
| Model | Input $/1M | Cached $/1M | Output $/1M | Context | Best For |
|---|---|---|---|---|---|
grok-4.7 |
$2.00 | $0.50 | $6.00 | 500K | Current xAI flagship: reasoning, vision, function calling, structured output |
grok-4.6 |
$2.00 | $0.50 | $6.00 | 500K | Previous flagship, remains available |
The rates above are the official xAI Standard list rates before API429 or client-specific discounts. For requests with 200,000 or more input tokens, the whole request uses the long-context rates: $4 input, $1 cached input, and $12 output per 1M tokens. Reasoning tokens are output tokens for billing.
Use reasoning_effort with low, medium, high, or xhigh. If omitted,
xAI defaults to high. stop, presence_penalty, and frequency_penalty are
not accepted by Grok 4.7. Local function tools are supported; xAI-hosted web,
X-search, and code-execution tools are not exposed by API429 yet because they
have separate per-call pricing.
Verified October 2, 2026. Availability is subject to your key permissions; check GET /v1/models.
Additional Grok catalogue IDs
The following vendor-prefixed compatibility IDs are separate catalogue
entries. Their x-ai/ prefix is part of the model id.
| Model | Input $/1M | Output $/1M | Best For |
|---|---|---|---|
x-ai/grok-4 |
$1.25 | $2.50 | Grok 4 compatibility tier — general chat and reasoning |
x-ai/grok-4-reasoning |
$1.25 | $2.50 | Grok 4 with extended reasoning / thinking |
x-ai/grok-3 |
$1.25 | $2.50 | Fast, cost-effective general-purpose Grok |
x-ai/grok-3-reasoning |
$1.25 | $2.50 | Grok 3 with extended reasoning |
Extended vendor-prefixed chat IDs
These IDs offer additional GPT and Gemini tiers alongside the native catalogue above. They are billed per the table below and accept the same chat parameters.
| Model | Input $/1M | Output $/1M | Notes |
|---|---|---|---|
openai/gpt-5 |
$1.00 | $8.00 | GPT-5 standard |
openai/gpt-5-instant |
$1.25 | $10.00 | Low-latency GPT-5 variant |
openai/gpt-5-thinking |
$1.25 | $10.00 | GPT-5 with extended reasoning |
google/gemini-2.5-flash |
$0.30 | $2.50 | Fast, low-cost Gemini |
Availability of every model above is gated by your token. Always check your token's
GET /v1/modelsresponse for the authoritative selectable list and current pricing.
Example
from openai import OpenAI
client = OpenAI(
base_url="https://gateway.api429.com/v1",
api_key="YOUR_API_KEY",
)
resp = client.chat.completions.create(
model="grok-4.6",
messages=[{"role": "user", "content": "Explain quantum entanglement in two sentences."}],
reasoning_effort="high",
)
print(resp.choices[0].message.content)
Quickstart: the first request · Models and prices · Get an API key