- Home
- AI Gateway
- Grok 4.6
Grok 4.6
openrouter
x-ai/grok-4.6
Quick start
TypeScript
cURL
import OpenAI from 'openai'
const openai = new OpenAI({
apiKey: process.env.CODEPLATFORM_API_KEY,
baseURL: 'https://ai.codeplatform.net/v1',
})
const response = await openai.chat.completions.create({
model: 'x-ai/grok-4.6',
messages: [{
role: 'user',
content: 'Hello world',
}],
})API details
Send requests to the OpenAI-compatible /v1/chat/completions endpoint.
Capabilities
Pricing
Input tokens (per 1M)$2.00
Output tokens (per 1M)$6.00
Cached input (per 1M)$0.50
Limits
Context length500,000 tokens
Max output500,000 tokens