← Back to All Providers

xAI API Pricing

xAI API pricing for all 6 models, updated April 2026. Compare input and output token costs per 1M tokens across the full xAI model range.

Cheapest model: Grok 4 Fast at $0.20/1M input tokens

tokens
tokens
Model
Provider
Input / 1M
Output / 1M
Est. Input Cost
Est. Output Cost
Grok 4 Fast2,000,000 ctx
xAI$0.20$0.50$0.2000$0.5000
Grok 4.1 Fast2,000,000 ctx
xAI$0.20$0.50$0.2000$0.5000
Grok 3 Mini131,000 ctx
xAI$0.30$0.50$0.3000$0.5000
Grok 4.20 Beta2,000,000 ctx
xAI$2.00$6.00$2.0000$6.0000
Grok 4256,000 ctx
xAI$3.00$15.00$3.0000$15.0000
Grok 3131,000 ctx
xAI$3.00$15.00$3.0000$15.0000
Showing 6 models
Prices updated daily. Last update: 4/25/2026

About xAI API Pricing

xAI offers 6 API models tracked on UsagePricing. All prices shown are standard pay-as-you-go rates per 1 million tokens — input tokens (your prompt) and output tokens (the model's response) are billed separately. Prices are reviewed daily and reflect the latest published rates from xAI.

Frequently Asked Questions

How much does xAI API cost?

xAI offers 6 API models. Pricing starts from $0.20 per 1M input tokens as of April 2026. Compare all xAI models on this page.

What is the cheapest xAI model?

As of April 2026, the cheapest xAI model by input price is Grok 4 Fast at $0.20 per 1M input tokens.

How do I calculate my xAI API costs?

Use the free xAI pricing calculator on UsagePricing.com. Enter your expected monthly token volume and the calculator estimates your total API spend based on current xAI rates.