Grok API Pricing

xAI lists 4 Grok models on its API. Prices below are per million tokens, in US dollars, for input (your prompt), output (the model's reply), cached input (prompt-cache reads) and the batch API.

Every price verified on or after from xAI's pricing page.

Grok API prices per million tokens

ModelInputOutputCached inputBatch inputBatch outputContext
Grok 4.7$2.00$6.00$0.50——500K
Grok Build 0.1$1.00$2.00$0.20——256K
Grok 4.3$1.25$2.50$0.20$1.00$2.001M
Grok 4.20$1.25$2.50$0.20$1.00$2.001M

A dash means xAI lists no such rate for that model. Batch rates apply the batch API discount to the standard rates. These are xAI's direct API rates; cloud platforms can charge differently.

What the headline prices leave out

  • Grok 4.7: Prompts of 200K tokens or more are billed at $4 in / $1 cached / $12 out for the whole request. Batch API not supported. Priority processing is 2x; the US regional endpoint is 1.1x.
  • Grok Build 0.1: Coding model; also serves the grok-code-fast-1 alias. Prompts of 200K tokens or more are billed at $2 in / $0.40 cached / $4 out for the whole request. Batch API not supported.
  • Grok 4.3: Prompts of 200K tokens or more are billed at $2.50 in / $0.40 cached / $5 out for the whole request. Priority processing is 2x.
  • Grok 4.20: Priced as grok-4.20-0309 (reasoning and non-reasoning). Prompts of 200K tokens or more are billed at $2.50 in / $0.40 cached / $5 out for the whole request.

Which Grok model is cheapest for your workload

Monthly cost of 10 million tokens on each model, for five common usage patterns. The cheapest model for each pattern is marked. The cheapest model is not always good enough for the task, so compare quality on your own prompts before you switch. Cached workloads assume each cache entry is read 10 times; a model without a batch API pays its standard rate on the batch job.

ModelChat assistant7.5M input, 2.5M outputDocument Q&A9M input, 1M outputContent generation2.5M input, 7.5M outputRepeated long prompt7.5M input (75% cache hits), 2.5M outputOvernight batch job7.5M input, 2.5M output via the batch API
Grok 4.7$30.00$24.00$50.00$21.56$30.00
Grok Build 0.1$12.50Cheapest$11.00Cheapest$17.50Cheapest$8.00Cheapest$12.50Cheapest
Grok 4.3$15.63$13.75$21.88$9.72$12.50
Grok 4.20$15.63$13.75$21.88$9.72$12.50

Grok Build 0.1 is cheapest for every pattern because its input and output rates are both the lowest xAI lists for text. Cheapest is not best: the registry has no capability tier, so check quality on your own prompts before you switch.

Price your own workload with Grok 4.7

Cite this data

Vanta Calc, Grok API Pricing, https://www.vantacalc.com/technology/llm-pricing/xai/, last updated 30 September 2026

Last updated

Reuse licensing is awaiting owner confirmation. For licensing enquiries, use our contact form.

All LLM API prices · Compare models side by side