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.
| Provider | Model | Input $/1M | Output $/1M | |
|---|---|---|---|---|
| xAI | Grok Build 0.1 | $1.00 | $2.00 | |
| Qwen | Qwen3.7 Flash | $0.030 | $0.130 | Compare |
| DeepSeek | DeepSeek V4.1 Flash 1017 | $0.038 | $0.500 | Compare |
| Gemma 4 26B A4B | $0.068 | $0.225 | Compare | |
| OpenAI | GPT-6 Luna Pro | $0.100 | $0.500 | Compare |
| Anthropic | Claude Haiku 5.5 | $0.100 | $0.500 | Compare |
| Mistral | Ministral 3 3B 2512 | $0.100 | $0.100 | Compare |
| Moonshot | Kimi K3 | $0.192 | $16.00 | Compare |
| # | Model | Provider | Input $/1M | Output $/1M | Context | Capabilities | Released |
|---|---|---|---|---|---|---|---|
| 1 | Grok 4.7 | xAI | $2.00 | $6.00 | 500 K | 09/21/2026 | |
| 2 | Grok 4.6 | xAI | $2.00 | $6.00 | 500 K | 08/12/2026 | |
| 3 | Grok 4.5 | xAI | $2.00 | $6.00 | 500 K | 07/08/2026 | |
| 4 | Grok 4.3 | xAI | $1.25 | $2.50 | 1 M | 04/17/2026 | |
| 5 | Grok Build 0.1 | xAI | $1.00 | $2.00 | 256 K | 04/16/2026 | |
| 6 | Grok 4.20 Multi-Agent | xAI | $1.25 | $2.50 | 2 M | 03/31/2026 | |
| 7 | Grok 4.20 | xAI | $1.25 | $2.50 | 2 M | 03/31/2026 |
More free tools
See allFrequently 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.