xAI API: models and pricing

Pick up to 3 models · pricing, context and capabilities · simulate your product cost

Data updated on September 30, 2026· 217 models

7 xAI chat models available by API, newest first, with price per million tokens, context and capabilities. Data as of 09/30/2026.

#ModelProviderInput $/1MOutput $/1MContextCapabilitiesReleased
1Grok 4.7xAI$2.00$6.00500 K09/21/2026
2Grok 4.6xAI$2.00$6.00500 K08/12/2026
3Grok 4.5xAI$2.00$6.00500 K07/08/2026
4Grok 4.3xAI$1.25$2.501 M04/17/2026
5Grok Build 0.1xAI$1.00$2.00256 K04/16/2026
6Grok 4.20 Multi-AgentxAI$1.25$2.502 M03/31/2026
7Grok 4.20xAI$1.25$2.502 M03/31/2026

Frequently asked questions

How much does the xAI API cost?

It depends on the model: from $1.00 to $2.00 per million input tokens. The cheapest is Grok Build 0.1 ($1.00 / $2.00); the newest is Grok 4.7 ($2.00 / $6.00). Data as of 09/30/2026.

How many xAI models are available by API?

7 chat models in the catalog, as of 09/30/2026. Each one has its own sheet with pricing, context and capabilities.

Where do the prices come from and how often are they updated?

From the public catalogs of OpenRouter, models.dev and LiteLLM, which publish each provider's list prices. They sync once a day and the last update date is shown above the comparison.

What does price per million tokens mean?

It is what the provider charges per million tokens you send (input) or the model generates (output). A token is roughly 4 characters. Output almost always costs more than input.

Sources: OpenRouter, models.dev and LiteLLM. Prices in USD per million tokens, list price, no volume discounts. Prompt tokens are an estimate; each provider's tokenizer may differ.