AI API Prices › xAI (Grok)

xAI (Grok) API pricing

The Grok family from xAI, with real-time data access and large context.

xAI (Grok) models — price per 1M tokens

All prices in USD, last verified 2026-06-26. Cheapest reference cost first; click a column to re-sort.

Model Input /1M Output /1M Cost / call* Context Type
Grok 3 mini $0.100 $0.300 $0.0004 128K Fast / cheap
Grok 4 Fast
2M context
$0.200 $0.500 $0.0007 2M Fast / cheap
Grok Code Fast 1
Code-specialised
$0.200 $1.50 $0.0017 256K Balanced
Grok 4
Flagship
$3.00 $15.00 $0.018 256K Flagship

*Reference cost of one call with 1,000 input + 1,000 output tokens — a neutral yardstick. Use the calculator for your real usage. Cheapest row highlighted.

Cheapest xAI (Grok) model: Grok 3 mini at $0.100 in / $0.300 out per 1M tokens. Compare it against other providers on the full pricing table.

How xAI (Grok) API pricing works

xAI (Grok) bills per token: an input price for everything you send and a higher output price for what the model generates, both quoted per million tokens. To estimate a real bill, multiply by your monthly request volume — the cost calculator does this across every model at once.

Before committing to volume, always confirm the current numbers on the official xAI (Grok) pricing page — the list prices here are verified periodically but the market moves fast.

See also