FREE TOOL · PRICES VERIFIED OCTOBER 16, 2026

Grok API Pricing

Every current Grok model with its real per-million-token price — plus the long-context surcharge, a calculator for your own workload, and a straight comparison against the frontier rivals xAI is undercutting.

MODELS
4
INPUT FROM
$1.00/1M
OUTPUT UP TO
$6.00/1M
MAX CONTEXT
1M
ESTIMATE YOUR WORKLOAD
MODELINPUT $/1MCACHED INOUTPUT $/1MBLENDEDCONTEXTYOUR COST
Grok 4.7
grok-4.7 · ≥200K: $4/$12
$2.00$0.50$6.00$3.00500K$5.00
Grok 4.6
grok-4.6 · ≥200K: $4/$12
$2.00$0.50$6.00$3.00500K$5.00
Grok 4.3
grok-4.3 · ≥200K: $2.50/$5
$1.25$0.20$2.50$1.561M$2.50
Grok Build 0.1
grok-build-0.1 · coding
$1.00$0.20$2.00$1.25256K$2.00

USD per 1M tokens from xAI’s official pricing page as of October 16, 2026. Blended assumes a 3:1 input:output ratio. Get keys at the xAI console.

HOW XAI PRICING WORKS

The cheapest frontier sticker among the closed labs.

Grok 4.7, released in September, keeps xAI’s flagship sticker at $2 input / $6 output per 1M tokens — the lowest headline rate of any closed-lab flagship, level with GPT-6 Sol on input, 40% below it on output, and well under Claude Opus 5.5. The previous flagship 4.6 stays at the same price, and Grok 4.3 hangs around as the value pick: $1.25 / $2.50 with a full 1M-token window.

The catch mirrors Gemini: a long-context surcharge. Once a prompt reaches 200K tokens, every Grok text model bills the whole request at double rates — $4 / $12 on 4.7 and 4.6, $2.50 / $5 on 4.3, $2 / $4 on Grok Build — cached input included. Cached input helps on the other side — repeated prefixes bill at about a quarter of the fresh rate ($0.50 on 4.7).

Grok Build 0.1 is the coding-tuned model at $1 / $2 with 256K context — priced to compete with open-weight coding models like Kimi K2.7 Code rather than with the closed-lab rivals.

How much does the Grok API cost?

Grok bills per token with separate input and output rates per million tokens: Grok 4.7 and 4.6 at $2 / $6, Grok 4.3 at $1.25 / $2.50, and the coding-focused Grok Build 0.1 at $1 / $2. Prompts of 200K tokens or more bill at double rates on every model.

What is the cheapest Grok model?

Grok Build 0.1 at $1 input / $2 output per 1M tokens — but it is tuned for coding. For general work, Grok 4.3 at $1.25 / $2.50 with a 1M-token context is the value pick.

What is the Grok long-context surcharge?

Requests whose prompts reach 200K tokens bill at double rates: $4 / $12 on Grok 4.7 and 4.6 (up from $2 / $6), $2.50 / $5 on Grok 4.3, and $2 / $4 on Grok Build. Budget at the surcharge rate if you regularly send very large contexts.

Is Grok cheaper than GPT and Claude?

At sticker price, yes: Grok 4.7 blends to about $3/1M tokens versus $4 for GPT-6 Sol and $8 for Claude Opus 5.5. Output-heavy workloads benefit most, since Grok charges $6 per 1M output tokens against $10–20 for the rivals. The matchup table below puts them side by side.

Where do I get a Grok API key?

From the xAI console at console.x.ai — usage is pay-as-you-go per token. Grok models are also available through OpenRouter if you want one key across many vendors.

HOW XAI STACKS UP

Grok vs. its closest rivals, tier by tier

BLENDED $/1M · 3:1 IN:OUT
FLAGSHIP
Grok 4.7
$3.00/1M
GPT-6 Sol
$4.00/1M
Gemini 3.1 Pro
$4.50/1M
COMPARE
VALUE FRONTIER
Grok 4.3
$1.56/1M
DeepSeek V4 Pro
$1.98/1M
GLM-5.3
$2.15/1M
COMPARE
CODING
Grok Build 0.1
$1.25/1M
Kimi K2.7 Code
$1.71/1M
Claude Sonnet 5
$4.00/1M
COMPARE

Also see: OpenAI API pricing · Claude API pricing · Gemini API pricing · DeepSeek API pricing · Kimi API pricing · GLM API pricing · MiniMax API pricing · MiMo API pricing · all 68 models

BUILDING ON THE XAI API?

Your users will spend these tokens. Meter them per API key.

ReqKey gives every key a credit balance — validate, deduct, enforce limits, and watch per-consumer Grok spend in real time.