Providers / xAI
xAI API Pricing
xAI sells Grok through a single usage-based API. Grok 4.7 is the current flagship at $2 per million input tokens and $6 per million output tokens below 200k prompt tokens, with Grok 4.6 and Grok 4.5 on the same short-context list price and Grok 4.3 the cheaper 1M-context option at $1.25 / $2.50. Cached input discounts and a 20% Batch API cut apply across these text models.
The billing detail that catches teams out is long-context pricing: once a prompt reaches 200k tokens, xAI bills the entire request at roughly 2× the short-context rates. Speed variants such as Grok 4.7 Fast are billed only inside Cursor and Grok Build and are not on the public API, so they never appear in the table below. Imagine (image/video) and Voice APIs use per-image or per-minute schedules and are tracked separately from token pricing.
Prices below are xAI’s official API list prices from docs.x.ai, each stamped with a verification date. Consumer Grok subscriptions and third-party gateways use different schedules and are not mixed in.
xAI models and prices
USD per 1M tokens, official API list prices.
Further reading
Frequently asked questions
What is the cheapest xAI API model?
Grok 4.3, at $1.25 per 1M input tokens and $2.5 per 1M output tokens (verified 2026-10-26). Its cost calculator shows worked examples at realistic volumes.
Are these xAI's official prices?
Yes — this page tracks official API list prices only, each cross-checked and stamped with a verification date. Gateway resellers and consumer subscriptions use different schedules and are not mixed in.
How do I estimate my xAI bill?
Open any model above and use its calculator: enter your input, output and cached token counts plus your call volume, and it computes the per-call and monthly cost from the same verified prices. The homepage calculator also compares models across providers side by side.