Provider
xAI API pricing: every model compared
xAI offers 7 models through its API in our data, priced from $1 to $2 per million input tokens. The newest is Grok 4.7, first listed on 2026-09-21.
- Models
- 7
- Cheapest input
- $1
- Priciest input
- $2
- Largest context
- 2,000,000
- With caching
- all
- Open weights
- none
Cheapest
Grok Build 0.1xAI$1 in · $2 outLargest context
Grok 4.20xAI2,000,000 tokensLine-up
Every xAI model and price
| Model | Input / 1M | Output / 1M | Context | Released |
|---|---|---|---|---|
| Grok 4.7 | $2 | $6 | 500,000 | 2026-09-21 |
| Grok 4.6 | $2 | $6 | 500,000 | 2026-08-12 |
| Grok 4.5 | $2 | $6 | 500,000 | 2026-07-08 |
| Grok Build 0.1 | $1 | $2 | 256,000 | 2026-05-20 |
| Grok 4.3 | $1.25 | $2.50 | 1,000,000 | 2026-04-30 |
| Grok 4.20 | $1.25 | $2.50 | 2,000,000 | 2026-03-31 |
| Grok 4.20 Multi-Agent | $1.25 | $2.50 | 2,000,000 | 2026-03-31 |
Prices in US dollars per 1M tokens, newest first. Release dates are when our source first listed the model.
Overview
xAI’s pricing at a glance
The spread between xAI’s cheapest and most expensive model is large: Grok 4.7 costs 2× more per input token than Grok Build 0.1. Picking the smallest model that does the job well is usually the biggest saving available, ahead of any discount.
All of the line-up has a cached-input price, which helps chatbots and agents that resend the same instructions. 2 of 7 can run through a batch API at a discount, for work that can wait up to a day. All accept images as input.
FAQ
xAI API questions
How much does the xAI API cost?
xAI's 7 models range from $1 to $2 per million input tokens, and output costs more than input on almost every model. The exact bill depends on your token volumes, which you can estimate in the LLM cost calculator.
What is xAI's cheapest model?
By blended price (three parts input to one part output) it is Grok Build 0.1, at $1 input and $2 output per million tokens. The most expensive is Grok 4.7.
Which xAI model has the largest context window?
Grok 4.20, with 2,000,000 tokens per request.
Does xAI offer prompt caching or batch discounts?
In our data, all of xAI's models have a published cached-input price and 2 of 7 have a published batch price. Both can cut costs substantially for repeated prompts or work that can wait.