xAI API Pricing

Compare all 3 xAI models with detailed pricing, capabilities, and performance metrics.

All Models

Model NameCategoryInput PriceOutput PriceCached InputBatch InputContextMax OutputMultimodalFine-tuning
Grok 4.3
Latest xAI flagship (GA May 2026). Aggressive pricing at the frontier-quality tier.
Flagship$1.250000$2.500000$0.2000001M32.8KImage
Grok Build 0.1
xAI's coding-focused model. Replaces Grok Code Fast (retired May 15, 2026).
Mid-Tier$1.000000$2.000000256K32.8KText
Grok 3 mini
Compact Grok model for cost-sensitive reasoning tasks.
Budget$0.300000$0.500000$0.070000131.1K16.4KText

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 Comparison

Estimate Your Costs

Calculate how much you'll spend with xAI's models based on your projected token usage.

Go to Cost Estimator

Frequently 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.