xAI

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
Why Choose: Unique real-time access to social media data. Good choice for applications requiring current information.
14
Total Models
$0.20
Lowest Input
2.0M
Max Context
5
Capabilities

Pricing Features

  • Pay-per-token billing
Pricing Notes:

Competitive pricing with the broader market. Available through xAI API and various partners.

API Features

StreamingFunction CallingVisionReal-time Knowledge

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.

💰

Lowest Cost

Best value for budget-conscious projects.

Grok 4 Fast
$0.70 total
💬

Chat / Customer Service

High volume, short responses.

Grok 4 Fast
$0.70 total
💻

Code Generation

Longer outputs, focus on output price.

Grok Code Fast 1
$1.50 output
🧠

Complex Reasoning

Math, logic, multi-step problems.

Grok 4 Fast
$0.70 total
👁️

Image Understanding

Analyze images and documents.

Grok 4 Fast
$0.70 total
📄

Long Documents

Process large files and contexts.

Grok 4 Fast
2.0M context

💰 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 xAI Grok Code Fast 1 Current $0.20 $1.50 $1.70 256k
OpenAI OpenAI GPT-5.2 Chat $1.75 $14.00 $15.75 128k 826% more
OpenAI OpenAI GPT-5.2 Pro $21.00 $168.00 $189.00 400k 11018% more
OpenAI OpenAI GPT-5.2 $1.75 $14.00 $15.75 400k 826% more
OpenAI OpenAI GPT-5.1-Codex-Max $1.25 $10.00 $11.25 400k 562% more
OpenAI OpenAI GPT-5.1 $1.25 $10.00 $11.25 400k 562% more
OpenAI 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
chatreasoningtool_usecode
View Details
Grok 4 Fast Cheapest $0.20 $0.50 2.0M
chatvisionreasoningtool_use
View Details
Grok 4.1 Fast Cheapest $0.20 $0.50 2.0M
chatvisionreasoningtool_use
View Details
Grok 3 Mini Beta $0.30 $0.50 131k
chatreasoningtool_use
View Details
Grok 3 Mini $0.30 $0.50 131k
chatreasoningtool_use
View Details
Grok 3 $3.00 $15.00 131k
chatreasoningtool_use
View Details
Grok 4 $3.00 $15.00 256k
chatvisionreasoningtool_use
View Details
Grok Beta FREE Free Free 131k
chat
View Details
Grok 2 1212 FREE Free Free 131k
chat
View Details
Grok 3 Beta $3.00 $15.00 131k
chattool_use
View Details
Grok 2 mini FREE Free Free 33k
chat
View Details
Grok 2 FREE Free Free 33k
chat
View Details
Grok Vision Beta FREE Free Free 8k
chatvision
View Details
Grok 2 Vision 1212 FREE Free Free 33k
chatvision
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.