Grok API pricing

All 2 xAI models we track, priced per 1 million tokens in US dollars, taken from xAI’s own pricing page and last checked 2026-10-25. Click a date to open the source.

ModelInputCached inputOutputChecked
Grok Build 0.1
Prompts of 200K tokens or more cost double.
$1$0.2$22026-10-25
Grok 4.7
Prompts of 200K tokens or more cost double.
$2$0.5$62026-10-25

US dollars per 1,000,000 tokens. Notes under a model name flag long-context surcharges, off-peak rates and announced price changes.

What typical workloads cost per month

Per-token prices are hard to picture, so here are two common workloads priced for a 30-day month. The cached column assumes 70% of each chat request’s input is a repeated prefix (system prompt and earlier turns) billed at the cached rate.

ModelChatbot / monthChatbot, cached / monthDocuments / month
Grok Build 0.1$84.00$50.40$165
Grok 4.7$192$129$345

Plug in your own traffic in the cost calculator, or line these models up against every other provider in the comparison table.

Caching and batch discounts at xAI

Minimum prompt lengths, cache lifetimes and worked examples for every provider are in our guide to prompt caching and batch discounts.

Frequently asked questions

What is the cheapest Grok API model?

Grok Build 0.1, at $1 per million input tokens and $2 per million output tokens.

What is the most expensive Grok API model?

Grok 4.7, at $2 per million input tokens and $6 per million output tokens.

Does xAI charge less for cached input?

Yes. 2 of the 2 models listed have a cached-input rate, 75–80% below their normal input price.

How many words is a million tokens?

Roughly 750,000 English words: a token is about four characters, or three quarters of a word. Code and most other languages use more tokens per word.

Other providers

Claude API pricingOpenAI API pricingGemini API pricingDeepSeek API pricing

Sources

Every price comes from the provider’s own pricing page: docs.x.ai/developers/pricing

Last reviewed: · Price history

Note: Prices change often and can differ by usage tier, region or contract. Every row links to xAI’s own pricing page with the date it was checked; confirm there before committing to a large workload.