How much does the Grok API cost?
Every Grok model we track, per 1M tokens.
| Model | Input | Cached input | Output | Context |
|---|---|---|---|---|
| Grok 4.7 | $2.00 | $0.50 | $6.00 | 500K |
| Grok 4.6 | $2.00 | $0.50 | $6.00 | 500K |
| Grok 4.5 | $2.00 | $0.30 | $6.00 | 500K |
| Grok 4.20 | $1.25 | $0.20 | $2.50 | 1M |
| Grok 4.3 | $1.25 | $0.20 | $2.50 | 1M |
From xAI's pricing page, checked 11 Nov 2026. See all LLM API prices for the other 6 providers.
Which Grok model is cheapest for a typical workload?
Of the models we track, Grok 4.20, at $7.50 a month for 1,000 input and 500 output tokens a request, 100 requests a day. The same traffic costs $15.00 on Grok 4.5. Every model, cheapest first:
| Model | Per request | Per month |
|---|---|---|
| Grok 4.20 | $0.0025 | $7.50 |
| Grok 4.3 | $0.0025 | $7.50 |
| Grok 4.7 | $0.005 | $15.00 |
| Grok 4.6 | $0.005 | $15.00 |
| Grok 4.5 | $0.005 | $15.00 |
What does a Grok prompt over 200K tokens cost?
Twice the normal rate, on the whole request. Once a prompt reaches 200,000 tokens, xAI bills every input, cached and output token in that request at its long-context rate, which is double the standard price on all 5 Grok models we track. It is a cliff, not a gradual increase.
On Grok 4.3, a 199,000-token prompt with a 1,000-token reply costs $0.251. Add 1,000 tokens to the prompt and the same request costs $0.505. If a prompt sits just over the line, trimming it halves the bill. Grok 4.20 and Grok 4.3 accept up to 1M tokens, and Grok 4.7, Grok 4.6 and Grok 4.5 accept 500K.
What do caching and batch save on Grok?
Cached input costs 16% of the input price on Grok 4.20 and Grok 4.3, 15% on Grok 4.5 and 25% on Grok 4.7 and Grok 4.6. Cached tokens double above 200K as well, like every other token in the request.
The Batch API takes 20% off every token type on every Grok model we track, for requests that can wait; most finish within 24 hours. That is a smaller cut than the 50% OpenAI, Anthropic, Google and Mistral give, which is why the tables here show no batch columns. On the example workload, Grok 4.7 drops from $15.00 to $12.00 a month.
Two options cost more. Priority Processing bills twice the standard rate for lower latency, and the US regional endpoint bills 1.1 times the standard rate for inference that runs in the United States.
Which Grok models were retired?
On 15 May 2026, xAI retired Grok 4, Grok 4 Fast, Grok 4.1 Fast and Grok 3, among others. The old model names still resolve and are served by Grok 4.3, so code keeps working but the price changes: a call that went to Grok 4.1 Fast at $0.20 in and $0.50 out now bills at $1.25 and $2.50.
xAI has not published a shutdown date for any of the 5 models in the table. Our AI model comparison shows how they line up against GPT-6, Claude and Gemini on context and speed as well as price.
Is the Grok API free?
xAI's billing docs describe two ways to pay, prepaid credits and monthly invoicing, and mention promo codes, but no free tier. The cheapest models to run are Grok 4.20 and Grok 4.3, at $1.25 in and $2.50 out, which run the example workload for $7.50 a month. For $0, see the free LLM APIs we track.
How does Grok API pricing compare with OpenAI, Claude and Gemini?
The budget, flagship and top models from each provider on the same example workload, cheapest first. Grok rows are highlighted. For the full price lists, see OpenAI API pricing, Claude API pricing, Gemini API pricing, DeepSeek API pricing and Mistral API pricing.
| Model | Provider | Input | Output | Example month |
|---|---|---|---|---|
| GPT-6 Luna | OpenAI | $0.10 | $0.50 | $1.05 |
| Claude Haiku 5.5 | Anthropic | $0.10 | $0.50 | $1.05 |
| Gemini 3.5 Flash Lite | $0.30 | $2.50 | $4.65 | |
| Grok 4.20 | xAI | $1.25 | $2.50 | $7.50 |
| Grok 4.5 | xAI | $2.00 | $6.00 | $15.00 |
| GPT-6.1 Sol | OpenAI | $2.00 | $10.00 | $21.00 |
| Claude Sonnet 5.5 | Anthropic | $2.00 | $10.00 | $21.00 |
| Gemini 4 Argonpromo to 30 Nov | $2.00 | $10.00 | $21.00 | |
| GPT-6 Astra | OpenAI | $10.00 | $50.00 | $105.00 |
| Claude Fable 5.1 | Anthropic | $10.00 | $50.00 | $105.00 |
Frequently asked
How much does the Grok API cost per 1M tokens?
For prompts under 200K tokens, from $1.25 input and $2.50 output (Grok 4.20 and Grok 4.3) to $2.00 input and $6.00 output (Grok 4.7 and others). At 200K or more, every token in the request costs double. Checked 11 Nov 2026.
Which Grok model is cheapest?
Grok 4.20 and Grok 4.3, which share the lowest price: $1.25 input and $2.50 output per 1M tokens, with a 1M context window. The example workload costs $7.50 a month, or $6.00 through the Batch API.
Is the Grok API cheaper than OpenAI?
At the top end, Grok 4.7 costs $15.00 a month on the example workload, less than GPT-6.1 Sol at $21.00. At the budget end, Grok 4.3 at $7.50 costs more than GPT-6 Luna at $1.05.
Does xAI have a batch API discount?
Yes, 20% off every token type on each Grok model we track, for requests that can wait. Models not on xAI's batch list get no discount, and image and video generation in a batch is billed at standard rates.