xAI API Pricing
Compare all 3 xAI models with detailed pricing, capabilities, and performance metrics.
All Models
| Model Name | Category | Input Price | Output Price | Cached Input | Batch Input | Context | Max Output | Multimodal | Fine-tuning |
|---|---|---|---|---|---|---|---|---|---|
Grok 4.3 Latest xAI flagship (GA May 2026). Aggressive pricing at the frontier-quality tier. | Flagship | $1.250000 | $2.500000 | $0.200000 | — | 1M | 32.8K | Image | |
Grok Build 0.1 xAI's coding-focused model. Replaces Grok Code Fast (retired May 15, 2026). | Mid-Tier | $1.000000 | $2.000000 | — | — | 256K | 32.8K | Text | |
Grok 3 mini Compact Grok model for cost-sensitive reasoning tasks. | Budget | $0.300000 | $0.500000 | $0.070000 | — | 131.1K | 16.4K | Text |
Prices in USD per 1 million tokens. Data last updated 6/11/2026.
Compare xAI Models
Use the comparison tool to pit xAI models against each other or models from other providers:
Open Pricing ComparisonEstimate Your Costs
Calculate how much you'll spend with xAI's models based on your projected token usage.
Go to Cost EstimatorFrequently Asked Questions
How much does xAI API cost?
xAI offers a range of models with input pricing from $0.300000 to $1.25 per 1 million input tokens. Output pricing varies by model and ranges from $0.500000 to $2.50 per 1 million output tokens. Use the pricing comparison tool to see detailed breakdowns for all models.
Which xAI model is cheapest?
The Grok 3 mini is xAI's most cost-effective option at $0.300000 per 1M input tokens. It is text-only. Check the pricing table above to compare all available models or use the cost estimator tool for your specific use case.
Does xAI offer batch API pricing?
Currently, xAI does not appear to offer batch API pricing. However, pricing and features change frequently. Check xAI's official pricing page for the latest offerings.