xAI API: models and pricing

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

Data updated on November 14, 2026· 230 models

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

The cheapest xAI API model is Grok Build 0.1 ($1.00 input and $2.00 output per million tokens). The newest is Grok 4.7. Prices range from $1.00 to $2.00 per million input tokens. Data as of 11/14/2026.

Input price range

$1.00 – $2.00

per million input tokens

Cheapest model

Grok Build 0.1

$1.00 / $2.00

≈ $23.00/month in the example

Newest model

Grok 4.7

$2.00 / $6.00

≈ $54.00/month in the example

Cached input

$0.500 −75 %

per million tokens on Grok 4.7; 7 models with cache price

Prices are input / output in USD per million tokens. Example: 10,000 requests a month of 1,500 input + 400 output tokens.

xAI vs other AI APIs: the cheapest of each

The cheapest recent model of each provider, next to Grok Build 0.1.

ProviderModelInput $/1MOutput $/1M
xAIGrok Build 0.1$1.00$2.00
QwenQwen3.7 Flash$0.030$0.130Compare
DeepSeekDeepSeek V4.1 Flash 1017$0.038$0.500Compare
GoogleGemma 4 26B A4B $0.068$0.225Compare
OpenAIGPT-6 Luna Pro$0.100$0.500Compare
AnthropicClaude Haiku 5.5$0.100$0.500Compare
MistralMinistral 3 3B 2512$0.100$0.100Compare
MoonshotKimi K3$0.192$16.00Compare
#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

More free tools

See all

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 11/14/2026.

Is the xAI API free?

No: the xAI API is pay-as-you-go, billed per million tokens. The cheapest model, Grok Build 0.1, costs $1.00 per million input tokens and $2.00 per million output tokens, so light use costs cents. Any free credits depend on xAI's own offer.

Does the xAI API charge less for cached input?

Yes, on 7 of its 7 models. For example, Grok 4.7 charges $0.500 per million cached input tokens instead of $2.00: 75% less. The cache applies when you resend the same beginning of a prompt, like a long system prompt or a document.

How much does the xAI API cost per month?

For 10,000 requests a month of 1,500 input tokens and 400 output tokens: Grok Build 0.1 costs about $23.00 and Grok 4.7 about $54.00. Each model's page has a calculator for your own numbers.

How many xAI models are available by API?

7 chat models in the catalog, as of 11/14/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.