xAI API Pricing
Grok models from Elon Musk's AI company with real-time knowledge
8 paid models · 6 free · Price range: $0.20 - $3.00 /1M
About xAI
xAI, founded by Elon Musk, develops the Grok series of AI models. Grok is designed to be witty and has real-time access to X (Twitter) data, giving it unique capabilities for current events and social media analysis. Grok 2 offers strong reasoning and multimodal capabilities.
Key Highlights
- Real-time access to X (Twitter) data
- Strong reasoning capabilities
- Multimodal understanding
- Witty and engaging personality
- Competitive pricing
Pricing Features
- Pay-per-token billing
Competitive pricing with the broader market. Available through xAI API and various partners.
API Features
Common Use Cases
- • Social Media Analysis
- • Current Events
- • General Chat
- • Content Creation
- • Research
📊 xAI Model Comparison
Compare all models side by side. Sorted by total price (input + output).
| Model | Tier | Input /1M | Output /1M | Total /1M | Context | Best For |
|---|---|---|---|---|---|---|
| Grok 4 Fast | Budget | $0.20 | $0.50 | $0.70 | 2.0M | Complex reasoning, math |
| Grok 4.1 Fast | Budget | $0.20 | $0.50 | $0.70 | 2.0M | Complex reasoning, math |
| Grok 3 Mini Beta | Budget | $0.30 | $0.50 | $0.80 | 131k | Complex reasoning, math |
| Grok 3 Mini | Budget | $0.30 | $0.50 | $0.80 | 131k | Complex reasoning, math |
| Grok Code Fast 1 | Budget | $0.20 | $1.50 | $1.70 | 256k | Complex reasoning, math |
| Grok 3 | Flagship | $3.00 | $15.00 | $18.00 | 131k | Complex reasoning, math |
🎯 Which xAI Model Should You Choose?
Quick recommendations based on your use case.
💰 xAI Monthly Cost Examples
Estimated monthly costs for common use cases.
| Use Case | Monthly Usage | Grok 4 Fast (Budget) |
Grok Code Fast 1 (Flagship) |
|---|---|---|---|
|
Customer Service Bot
1000 conversations/day
|
500k input 200k output |
$0.20/mo | $0.40/mo |
|
Code Assistant
200 requests/day
|
1.0M input 500k output |
$0.45/mo | $0.95/mo |
|
Data Analysis
500 analyses/day
|
2.0M input 300k output |
$0.55/mo | $0.85/mo |
⚔️ xAI vs Competitors
How does {brand} compare to other major AI providers?
| Brand | Model | Input /1M | Output /1M | Total /1M | Context | vs {brand} |
|---|---|---|---|---|---|---|
xAI
|
Grok Code Fast 1 Current | $0.20 | $1.50 | $1.70 | 256k | — |
OpenAI
|
GPT-5.2 Chat | $1.75 | $14.00 | $15.75 | 128k | 826% more |
OpenAI
|
GPT-5.2 Pro | $21.00 | $168.00 | $189.00 | 400k | 11018% more |
OpenAI
|
GPT-5.2 | $1.75 | $14.00 | $15.75 | 400k | 826% more |
OpenAI
|
GPT-5.1-Codex-Max | $1.25 | $10.00 | $11.25 | 400k | 562% more |
OpenAI
|
GPT-5.1 | $1.25 | $10.00 | $11.25 | 400k | 562% more |
OpenAI
|
GPT-5.1 Chat | $1.25 | $10.00 | $11.25 | 128k | 562% more |
All Models
| Model | Input /1M | Output /1M | Context | Capabilities | Actions | |
|---|---|---|---|---|---|---|
| Grok Code Fast 1 Cheapest | $0.20 | $1.50 | 256k | View Details | ||
| Grok 4 Fast Cheapest | $0.20 | $0.50 | 2.0M | View Details | ||
| Grok 4.1 Fast Cheapest | $0.20 | $0.50 | 2.0M | View Details | ||
| Grok 3 Mini Beta | $0.30 | $0.50 | 131k | View Details | ||
| Grok 3 Mini | $0.30 | $0.50 | 131k | View Details | ||
| Grok 3 | $3.00 | $15.00 | 131k | View Details | ||
| Grok 4 | $3.00 | $15.00 | 256k | View Details | ||
| Grok Beta FREE | Free | Free | 131k | View Details | ||
| Grok 2 1212 FREE | Free | Free | 131k | View Details | ||
| Grok 3 Beta | $3.00 | $15.00 | 131k | View Details | ||
| Grok 2 mini FREE | Free | Free | 33k | View Details | ||
| Grok 2 FREE | Free | Free | 33k | View Details | ||
| Grok Vision Beta FREE | Free | Free | 8k | View Details | ||
| Grok 2 Vision 1212 FREE | Free | Free | 33k | View Details |
❓ xAI Pricing FAQ
What is the cheapest xAI model?
The cheapest xAI model is Grok 4.1 Fast at $0.70 per 1M tokens (input + output combined).
What is the maximum context length for xAI models?
xAI models support up to 2.0M context length, allowing you to process large documents and maintain long conversations.
How do I choose between xAI models?
For budget projects, choose the cheapest model. For code generation, prioritize low output price. For complex reasoning, choose models with reasoning capability. Use our scenario guide above.