We use cookies to enhance your experience, provide personalised content, and analyse our traffic; see our Cookie Policy.
xai/grok-4.6Long answers, and agents that keep working
Grok 4.6 is xAI's flagship, launched on 12 August 2026 for long-running agents and more ambitious interactive and visual work. On Tchavi it reads text, images and documents, with tools and JSON mode.
Last updated Nov 23, 2026
It is built for deep work: turning a product idea into a working first version, reviewing code with full explanations, writing research reports, analysing long documents. xAI highlights self-testing and verification on extended projects.
On Tchavi you reach it with mobile money, no international bank card and no KYC, with the same API key as 80+ other models. OpenAI-compatible: swap the base URL, keep your SDK. Your credits never expire.
Built by xAI for extended agentic tasks
Very long answers in a single pass
The model’s full window, priced in two tiers above 200K
Reads screenshots, diagrams and attached files with your text
Function calling and structured output
Read this incident timeline and write the postmortem: what broke, why it was not caught, and the two changes that would prevent a repeat.
Compare these two API designs for a payments webhook and recommend one, naming the failure mode each one accepts.
GPT-6 Sol (model: "gpt-6-sol") opens 1.05M tokens of context against 500K here. Grok 4.6 writes up to 450K out and targets long-running agents. For a very long input, Sol; for a very long answer, Grok. Test on your own task.
Claude Sonnet 5 (model: "claude-sonnet-5") takes 1M tokens of context and 128K of output; Grok 4.6 takes 500K in but writes up to 450K. Both read images and documents. Choose by the shape of your work: long input or long output.
Nothing is capped — the full 500K window is yours. xAI charges double above 200,000 input tokens, and Tchavi bills that tier rather than raising the rate for everyone: 4.4 credits per 1K in and 13.2 out below the line, 8.8 and 26.3 above it.
Yes: images and documents in, text out.
Swap the base URL for Tchavi's, use your Tchavi key and set model: "grok-4.6" on /v1/chat/completions. The rest of your code stays the same.
Yes. Top up your Tchavi account with Orange Money, MTN MoMo, M-Pesa or another mobile money operator. No bank card is needed. Credits land as soon as the payment is confirmed and are deducted as you use them.
Yes. Keep your current OpenAI SDK, just change the base URL to Tchavi's (shown in the API tab) and use your Tchavi key. The rest of your code stays the same.
import Tchavi from '@tchavi/sdk';
const client = new Tchavi({ apiKey: 'API_KEY' });
const response = await client.chat.completions.create({
model: 'grok-4.6',
messages: [
{
"role": "user",
"content": "Hello!"
}
],
});
console.log(response.choices[0].message.content);
console.log('Credits used:', response.tchavi.credits_used);Every parameter this model accepts on the API. Check the SDK for full typings.
modelRequiredID of the chat model (e.g. `grok-4.6`).
messagesRequiredConversation messages. Each item has a `role` (system/user/assistant) and a `content` that's either a plain string or an array of content blocks (`text`, `image_url`, `document_url`).
temperature1Sampling temperature between 0 and 2. Higher values = more random.
max_tokensMaximum number of tokens to generate in the response.
max_completion_tokensOpenAI alias for `max_tokens`. Either field works; if both are sent, `max_completion_tokens` wins.
streamfalseIf true, partial message deltas are streamed as Server-Sent Events.
toolsFunction-calling toolbox. Pass an array of `{ type: "function", function: { name, description, parameters } }`. Returned tool calls land in `choices[].message.tool_calls`. Only models with `supportsTools: true` accept this.
tool_choiceHow the model picks among tools: `"auto"` (default), `"none"` to force a plain text reply, or `{ type: "function", function: { name } }` to force a specific tool. Only with `supportsTools: true`.
response_formatConstrain the output. Pass `{ type: "json_object" }` to force valid JSON (the model still needs a JSON instruction in your prompt). Only models with `supportsJsonMode: true` honour this.
This model costs more upstream once a prompt passes a threshold, and we pass that through rather than cap the window or raise the price for everyone. The rate above is the first band.
| Prompt length | Input / 1K | Output / 1K |
|---|---|---|
| Under 200K tokens | ||
| 200K tokens and above |
The threshold counts every input token on the request, cached ones included: a 95K cache hit plus 10K of new prompt is a 105K prompt. Output is priced by the prompt’s length, so a long prompt with a short answer still pays the higher output rate.
Estimated over 30 days, for a typical message: ~500 input + ~150 output tokens, billed to the thousandth of a credit.