Grok 4.6 API

xAI's large language model for text generation and reasoning, with a 500K token context window and prompt caching support.

Modalities
TextText
In / Out price
$2/$6per 1M
Context window
500K tokens
Released
Aug 7, 2026

Grok 4.6 overview

The pelican test: one prompt, every text model, unedited SVG output from Nov 3, 2026.

SVG of a pelican riding a bicycle, written by Grok 4.6 through AI/ML API

Grok 4.6 specs

Model ID
x-ai/grok-4-6
Developer
xAI
Context window
500,000 tokens
Input
Text
Output
Text
API
OpenAI-compatible, base URL https://api.aimlapi.com/v1

Grok 4.6 is xAI's large language model for text generation and reasoning tasks, with a 500K token context window and prompt caching support.

Use cases

Grok 4.6 is documented as suited to coding, engineering, and office work tasks, including complex multi-step work across codebases and turning ideas into polished applications or work artifacts.

It is also documented for agentic long-running workflows, especially research across unfamiliar domains, analysis, and iterative development of applications and work artifacts.

The model card says it is evaluated on physical-world engineering workflows such as electrical and chip design, procedural 3D modeling via code, and parametric CAD and part generation.

Its documentation also highlights scientific research as a legitimate use case, alongside engineering and creative work.

Capabilities

  • Function calling
  • Streaming

Grok 4.6 benchmarks by Artificial Analysis

See how Grok 4.6 compares in generation speed and latency. Data retrieved Nov 3, 2026.

Speed

Output tokens / second

Benchmark results

Compare 7 models available on AI/ML API across 5 independent benchmarks.

Humanity's Last Exam

Expert-written questions across academic subjects.

Grok 4.6 API pricing

Grok 4.6 pricing in US dollars
UsagePriceUnit
Input$21M tokens
Output$61M tokens
Cached input$0.51M tokens

Prices from the AI/ML API price list, checked on Nov 4, 2026.

Grok 4.6 vs other models: token prices

AI/ML API input and output rates for 5 models, per million tokens.

AI/ML API model prices in USD per million tokens
ModelInputOutput
Grok 4.6$2$6
Grok Build 0.1$1$2
Grok 4.3$1.25$2.5
Grok 4.7$2$6
Grok 4.5$2$6

How to use the Grok 4.6 API

View docs

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "x-ai/grok-4-6",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'

Grok 4.6 FAQ

What is the context window of Grok 4.6?

Grok 4.6 has a 500,000 tokens context window.

What inputs and outputs does Grok 4.6 support?

Grok 4.6 takes text, file in as input and returns text out.

What is the model ID for Grok 4.6?

Use x-ai/grok-4-6 as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.

When was Grok 4.6 released?

Grok 4.6 became available on August 7, 2026.

How much does Grok 4.6 cost?

Grok 4.6 costs $2 input and $6 output per 1M tokens on AI/ML API, billed as you go with no subscription.

Does Grok 4.6 support streaming?

Yes, Grok 4.6 can stream responses as they are generated.

Who created Grok 4.6?

Grok 4.6 was built by xAI .

Start building with Grok 4.6

Grok 4.6 API

x-ai/grok-4-6

Build with your agent

Give your agent the model details, code and documentation.

1Get your API key

Create API key
export AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"

2Make your first request

curl 'https://api.aimlapi.com/v1/chat/completions' \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "x-ai/grok-4-6",
  "messages": [
    {
      "role": "user",
      "content": "Write a haiku about the ocean."
    }
  ]
}'