xAIReasoning Model
Grok 4.6
The August 2026 refresh of Grok 4.5 — same 500K context, same low/medium/high reasoning surface, and same token-efficient generation, with weights retuned for agentic coding and long-horizon tool use. Cache-read pricing is set marginally higher than 4.5 ($0.50/M vs $0.30/M); everything else prices identically.
import OpenAI from "openai";
const openai = new OpenAI({
baseURL: "https://api.inference.net/v1",
apiKey: "<YOUR_API_KEY>",
});
const completion = await openai.chat.completions.create({
model: "grok-4.6",
messages: [
{
role: "user",
content: "What is the meaning of life?"
}
],
stream: true,
});
for await (const chunk of completion) {
process.stdout.write(chunk.choices[0]?.delta.content as string);
}import OpenAI from "openai";
const openai = new OpenAI({
baseURL: "https://api.inference.net/v1",
apiKey: "<YOUR_API_KEY>",
});
const completion = await openai.chat.completions.create({
model: "grok-4.6",
messages: [
{
role: "user",
content: "What is the meaning of life?"
}
],
stream: true,
});
for await (const chunk of completion) {
process.stdout.write(chunk.choices[0]?.delta.content as string);
}