Provider
Grok API pricing: every xAI model, per million tokens
xAI’s Grok API costs from $1.25 (Grok 4.20) to $2 (Grok 4.5) per million input tokens and from $2.50 to $6 per million output tokens. Its newest model, Grok 4.7, costs $2 input and $6 output and was first listed on 2026-09-21. All of its models charge a higher rate once a prompt passes 200,000 tokens. Prices checked 2026-11-22.
- Models
- 6
- Cheapest input
- $1.25
- Priciest input
- $2
- Largest context
- 2,000,000
- With caching
- all
- Open weights
- none
Line-up
How much does each Grok model cost?
| Model | Input / 1M | Output / 1M | Cached / 1M | Context | Max output | Released |
|---|---|---|---|---|---|---|
| Grok 4.7 | $2 | $6 | $0.50 | 500,000 | – | 2026-09-21 |
| Grok 4.6 | $2 | $6 | $0.50 | 500,000 | – | 2026-08-12 |
| Grok 4.5 | $2 | $6 | $0.30 | 500,000 | – | 2026-07-08 |
| Grok 4.3 | $1.25 | $2.50 | $0.20 | 1,000,000 | – | 2026-04-30 |
| Grok 4.20 | $1.25 | $2.50 | $0.20 | 2,000,000 | – | 2026-03-31 |
| Grok 4.20 Multi-Agent | $1.25 | $2.50 | $0.20 | 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.
Cheapest
Grok 4.20xAI$1.25 in · $2.50 outLargest context
Grok 4.20xAI2,000,000 tokensCheapest
What is the cheapest Grok model?
By blended price (three parts input to one part output), the cheapest is Grok 4.20 at $1.5625 per million tokens, and the most expensive is Grok 4.7 at $3: 2× as much. Picking the smallest model that does the job well is usually the biggest saving available, ahead of any discount.
The largest context window is Grok 4.20’s 2,000,000 tokens.
Discounts
Does xAI offer prompt caching or batch discounts?
All of the line-up has a cached-input price, which helps chatbots and agents that resend the same instructions. 4 of 6 can run through a batch API at a discount, for work that can wait up to a day. All accept images as input.
- All of its models charge a higher rate once a prompt passes 200,000 tokens.
Prompt caching calculator · Batch API calculator · LLM cost calculator
Compare
How do Grok prices compare with other providers?
The median xAI model costs $2.2813 per million tokens blended. The providers closest to that are Perplexity Sonar ($3.50), Gemini ($1.3125) and OpenAI ($4).
Head to head: GPT-6.1 Sol vs Grok 4.7.
FAQ
Grok API questions
How much does the Grok API cost?
xAI’s 6 models range from $1.25 to $2 per million input tokens and from $2.50 to $6 per million output tokens. The newest, Grok 4.7, costs $2 and $6. Estimate your own bill in the LLM cost calculator.
What is the cheapest Grok model?
By blended price (three parts input to one part output) it is Grok 4.20, at $1.25 input and $2.50 output per million tokens. The most expensive is Grok 4.7, at $2 and $6.
Which Grok model has the largest context window?
Grok 4.20, with 2,000,000 tokens per request. The window is shared between your prompt and the reply.
Does xAI offer prompt caching or batch discounts?
In our data, all of xAI’s models have a published cached-input price and 4 of 6 have a published batch price. Both can cut costs substantially for repeated prompts or work that can wait.
Keep exploring