APIMart
Back to all models

Grok 4.6 API

xAIModel ID grok-4.6Text modelReleased August 12, 2026

Use Grok 4.6 to find why a chart re-renders on every keystroke, split a cross-service rename into steps an agent can check, or work out who pays for a repair under a lease.

Max input
500,000 tokens
Max output
128,000 tokens
Input → output
Text, Image → Text
  • Image input
  • Streaming
  • Cached input pricing
  • OpenAI SDK compatible

Grok 4.6 API use cases

Each use case comes with an illustrative example: source material, a prompt and a hand-written sample answer, not actual model output. Copy the prompt, swap in your own material and try it on Grok 4.6.

Try Grok 4.6 with your own material

Front-end performance fixes

Send the component code and describe what feels slow, and have Grok 4.6 point to what re-runs on each interaction and how to stop it. Check the result with the browser’s performance profiler before and after.

Example: Why does the chart lag while I type?

Material

SalesChart.tsx
const points = buildPoints(rows.filter(r => r.name.includes(query))); chart.setData(points);
Symptom
With 20,000 rows, each keystroke in the search box freezes the page for about half a second.

PromptUsing the component code and the symptom, explain why typing in the search box is slow and give the smallest fix.

Sample answer · written by hand to show the reasoning

Every keystroke filters all 20,000 rows and rebuilds the chart points during render. Wrap the filter and buildPoints in useMemo keyed on rows and query, and debounce the query by about 200 ms so the chart only rebuilds after typing pauses. Profile a keystroke again to confirm the long task is gone.

About the Grok 4.6 API

  • Built for long-running agents

    xAI released Grok 4.6 on August 12, 2026 as the successor to Grok 4.5, focused on long-running agents and more ambitious interactive and visual work, alongside coding and knowledge work.

  • Grok 4.7 costs the same

    xAI released Grok 4.7 on September 21, 2026 with a larger base model at the same price, speed and context window. Compare it first for new projects; workloads validated on Grok 4.6 can stay.

  • Always reasons, up to xhigh

    Reasoning cannot be turned off. Effort can be low, medium, high or xhigh, with high as the default; xhigh is available from Grok 4.6 onward. presence_penalty, frequency_penalty and stop are not supported.

  • Grok 4.6 API key and access

    You don’t need a separate Grok 4.6 API key: one APIMart key works for every model. Requests go through an OpenAI Chat Completions-compatible endpoint with the model ID grok-4.6.

Grok 4.6 official benchmark results

Selected results xAI published at launch.

  • Artificial Analysis Intelligence Index (high)

    61

    Composite score across many evaluations. Up from 56 for Grok 4.5; matches GPT-5.6 Sol at max effort (61), one point below Claude Fable 5 at max effort (62).

  • GDPval-AA v2 (high)

    1,753

    Real-world knowledge work across occupations, rated in Elo. Ahead of Claude Fable 5 (1,741), GPT-5.6 Sol (1,728) and Grok 4.5 (1,526).

  • Harvey LAB (high)

    15.8%

    Legal work graded by Vals. Ahead of Grok 4.5 (12.9%), Claude Fable 5 (11.3%) and GPT-5.6 Sol (2.5%).

  • APEX-Agents (high)

    57.5%

    Agent tasks from professional work. Up from 47.1% for Grok 4.5 and ahead of GPT-5.6 Sol (56.7%); Claude Fable 5 scores 59.2%.

  • CursorBench v3.2 (high)

    69.9%

    Coding tasks from the Cursor editor. Ahead of GPT-5.6 Sol (67.2%) and Grok 4.5 (66.7%); Claude Fable 5 scores 70.5%.

  • FrontierCode v1.1 Extended (high)

    61.3%

    Whether coding agents produce changes ready to merge. Up from 56.6% for Grok 4.5 and ahead of GPT-5.6 Sol (60.6%); Claude Fable 5 scores 63.6%.

How to call the Grok 4.6 API

To call Grok 4.6, you only need an APIMart API key and your existing OpenAI SDK, or send plain HTTP requests.

POST /v1/chat/completions
curl https://api.apimart.ai/v1/chat/completions \
  -H "Authorization: Bearer $APIMART_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "grok-4.6",
  "messages": [
    {
      "role": "user",
      "content": "Describe how to design a clear API in three sentences."
    }
  ],
  "stream": false
}'

Grok 4.6 access details

Model IDgrok-4.6
Base URLhttps://api.apimart.ai/v1
Endpoint/chat/completions

Common parameters

model
Required
messages
Required
stream
Optional
max_tokens
Optional
temperature
Optional
All request parameters, response fields and error codes

Grok 4.6 API request parameters

Grok 4.6 uses the general chat endpoint, POST /v1/chat/completions, with a JSON body. model and messages are required; every other parameter is optional.

ParameterTypeRequiredDescription
modelstringYesModel ID. Use grok-4.6 for this model.
messagesarrayYesConversation messages. Each message has a role (system, user, or assistant) and content. Include earlier messages for multi-turn conversations.
streambooleanNoWhether to stream the output. true returns chunks over SSE, false returns the full response at once. Default: true.
temperaturenumberNoOutput randomness, 0–2. Default: 1.0. Lower values give more deterministic output.
top_pnumberNoNucleus sampling, 0–1. Default: 1.0. Adjust this or temperature, not both.
max_tokensintegerNoMaximum number of tokens to generate for the reply.
frequency_penaltynumberNoFrequency penalty, -2.0 to 2.0. Default: 0. Positive values reduce repeated wording.
presence_penaltynumberNoPresence penalty, -2.0 to 2.0. Default: 0. Positive values encourage new topics.
stopstring | arrayNoUp to 4 stop sequences. Generation stops when any of them appears.
nintegerNoNumber of replies to generate. Default: 1.

Response fields

The response contains the fields below. Token usage is returned in usage, which you can use to check costs.

FieldTypeDescription
idstringUnique identifier for the request.
modelstringThe model that handled the request.
choicesarrayList of replies. Each item contains message (role and content) and finish_reason.
usageobjectToken usage: prompt_tokens, completion_tokens, and total_tokens.

Error codes

Failed requests return an error object with code, message, and type.

StatusTypeMeaning
400invalid_request_errorInvalid request parameters.
401authentication_errorThe API key is invalid or missing.
402payment_requiredInsufficient account balance.
403permission_errorNo permission to access this resource.
429rate_limit_errorToo many requests. Retry later.
500server_errorInternal server error.
502bad_gatewayGateway error. The service is temporarily unavailable.

Grok 4.6 API pricing

The Grok 4.6 API is billed by token usage, and prices depend on your membership tier. Prices below are per million tokens; 1 US dollar = 10 credits.

ItemGoldCurrent pricePlatinumDiamondOfficial priceYou save
Input16Credits~$1.615.2Credits~$1.5214.4Credits~$1.4420Credits~$220%
Cached input4Credits~$0.43.8Credits~$0.383.6Credits~$0.365Credits~$0.520%
Output48Credits~$4.845.6Credits~$4.5643.2Credits~$4.3260Credits~$620%

Prices are for reference only. View full pricing

Why call Grok 4.6 API through APIMart

  • 20% below official pricing

    Grok 4.6 API pricing is billed by token usage. Gold to Diamond member prices are 20%–28% below xAI's official prices, and cached input costs just $0.4 per 1M tokens.

    See membership prices
  • One API key for 500+ models

    Grok 4.6, the rest of its family and 500+ models from GPT, Claude, Gemini and more share one API key and one account balance. Switching models is just a change to the model parameter.

  • Change two lines of existing code

    If you already use the OpenAI SDK, point base_url at https://api.apimart.ai/v1 and swap in your APIMart API key. Requests and responses keep the same format.

  • Try it online before you code

    Try Grok 4.6 with your own material in the Playground, no code or setup needed, and integrate once you like the results.

    Open Playground

Which xAI model should you choose?

Base prices per 1M tokens (USD). Your Grok 4.6 API key works for every model in the table; just change the model parameter.

Differences between xAI models
ComparisonGrok 4.6 CurrentGrok 4.3Grok 4.5Grok 4.7
Best forLong-running agents, Interactive front-end work, Knowledge workTool calling, Instruction following, 1M-token contextCoding agents, Engineering workflows, Knowledge workAgentic coding, Legal and office work, Engineering calculations
Max input500,000 tokens1,000,000 tokens500,000 tokens500,000 tokens
Max output128,000 tokens1,000,000 tokens500,000 tokens128,000 tokens
Knowledge cutoff———May 2026
Input price$1.6$1$1.6$1.6
Output price$4.8$2$4.8$4.8

Grok 4.6 FAQ

Should I use Grok 4.6 or Grok 4.7?

Compare Grok 4.7 first for new projects. xAI released it on September 21, 2026 with a larger base model at the same price and speed as Grok 4.6, and the context window is unchanged; in xAI’s published results it rises from 40.4% to 46.3% on CursorBench 4.0 (Grok 4.6 at high effort, Grok 4.7 at xhigh). xAI’s model docs recommend Grok 4.7 for code and general work. Workloads already tuned and validated on Grok 4.6 can stay on it. On APIMart both share one endpoint and API key, so you only change the model parameter.

How is input of 200K tokens or more billed?

Under xAI’s pricing rules, when a request’s prompt reaches 200,000 tokens, every token in that request is billed at the higher tier: input, cached input and output all cost 2x the base tier. The pricing table on this page shows the base tier; the higher-tier prices are on the pricing page.

Can I turn off reasoning on Grok 4.6?

No. According to xAI’s docs, reasoning cannot be disabled; effort can be low, medium, high or xhigh, with high as the default, and xhigh is available from Grok 4.6 onward. Reasoning models cannot use the presence_penalty, frequency_penalty and stop parameters, and requests that include them return an error.

Is there a Grok 4.6 fast variant?

xAI’s announcement mentions a fast variant at twice the price. On APIMart the model is grok-4.6, the standard version, billed at the rates in the pricing table on this page.

Can Grok 4.6 access real-time information?

Not by itself. According to xAI’s docs, Grok models have no real-time knowledge unless xAI’s server-side search tools (Web Search and X Search) are enabled. The examples on this page do not include search tools, so when you need current information, put the relevant material in the request.

Why is the APIMart output limit different from xAI’s documentation?

xAI does not set a fixed text output limit for Grok 4.6 in its documentation. For calls through APIMart, use the limit shown on this page: 128,000 tokens per request.

How can I try this model online?

Click Start chatting or Open Playground to visit the existing APIMart Playground. Select Grok 4.6 in the text category to start exploring.

Which model ID does the Grok 4.6 API use?

Set model to grok-4.6. Copy the exact ID from the page heading or the integration details panel.

Is it compatible with the OpenAI SDK?

You can keep the OpenAI SDK. Set base_url to https://api.apimart.ai/v1, provide your APIMart API key, and use the model ID on this page.

What is the context window of Grok 4.6?

On APIMart, Grok 4.6 accepts up to 500,000 input tokens per request. Your prompt, earlier messages, and file content all count toward it.

How many tokens can it output at once?

Grok 4.6 can output up to 128,000 tokens in a single reply. Use the max_tokens parameter to set a lower limit.

How much does the Grok 4.6 API cost?

The Grok 4.6 API on APIMart is billed by token, and prices depend on your membership tier. Gold: $1.6 per million input tokens and $4.8 per million output tokens. Diamond: $1.44 per million input tokens and $4.32 per million output tokens. Prices may change; the pricing page has the current rates.

Does it support streaming?

Yes. The general chat endpoint streams over SSE by default. Set stream to false to receive the complete response at once.

How do I get an API key?

Sign in to APIMart and create a key on the API Keys page, then send it in the Authorization: Bearer header. The same key also works for other models on the platform.