xAI
Grok-4.5
xAI's latest flagship with a 500K context window and live search — standout agentic coding and tool-use performance
Context Length500K tokens
Model TypeLarge Language Model (LLM)
MultimodalText, Image Input
Pricing & Specs
💰 Pricing
Input$2 / M tokens
Output$6 / M tokens
Cache Hit$0.5 / M tokens
⚙️ Specs
Context Length500K tokens
Model TypeLarge Language Model (LLM)
MultimodalText, Image Input
Special CapabilitiesReal-time Internet Search
ReasoningAlways on (low/medium/high)
Long-context Pricing (>200K)Input $4; cached input $1; output $12 / M tokens for the full request
Live Search$5 / 1K queries
Release DateJuly 8, 2026
Knowledge CutoffFebruary 2026
API Examples
Python
from openai import OpenAI
client = OpenAI(
base_url="https://api.xairouter.com/v1",
api_key="your-api-key"
)
response = client.chat.completions.create(
model="grok-4.5",
messages=[
{"role": "user", "content": "Hello!"}
]
)
print(response.choices[0].message.content)cURL
curl https://api.xairouter.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{
"model": "grok-4.5",
"messages": [
{"role": "user", "content": "Hello!"}
]
}'