Provider

xAI API Cost Calculator and Comparison

Every xAI model, side by side β€” current API rates, context window, benchmarks, and a live calculator that ranks them at your exact workload. 3 active models, 3 with public pricing, starting from $3.00/1M input. Prices refreshed daily from xAI’s official pricing page.

Models tracked

3

Active

3

With public pricing

3

Cheapest input

$3.00/1M

As of April 2026, xAI offers 3 active AI models via API, starting at $3.00/1M input tokens. The most context-rich model handles up to 256K tokens. Models include support for vision, tool use. All prices are in USD per 1 million tokens; output tokens cost more than input on every model.

Interactive

Calculate your xAI API cost at your workload.

Set your workload β€” every priced model ranks in real time.

Adjust the workload

Every model below updates in real time.

1,00010,00050,000250,0001M10M

Ranked by your monthly bill

No models with public pricing available to compare right now.

Pricing at a glance

Blended $/1M tokens across the lineup.

Blended price uses a 3-to-1 input/output ratio β€” a common industry standard. Green bar = cheapest.

Every model

Every xAI model β€” pricing, context & capabilities.

ModelContextInput /1MOutput /1M
Grok 4.1256K$3.00$15.00
Grok 4256K$3.00$15.00
Grok 3131K$3.00$15.00

FAQ

xAI β€” questions we see most.

Pricing patterns, best-known use cases, and how this provider stacks up.

Get instant answers from our AI agent

xAI API pricing ranges starting at $3.00 per 1M input tokens. Output tokens cost more than input on every model. Prices are per 1 million tokens (1M β‰ˆ 750,000 words). Use the calculator above to estimate your monthly spend at your actual workload.
Grok 4.1 is the lowest-priced xAI model with public pricing at $3.00/1M input tokens. It suits high-volume tasks where cost matters most β€” classification, extraction, summarization, and similar workloads that don't need frontier reasoning.
Grok 4.1 is xAI's highest-tier model at $3.00/1M input. It delivers the most sophisticated reasoning, instruction-following, and nuance. For workloads that don't require frontier performance, a mid-tier model typically cuts inference costs substantially.
Grok 4.1, Grok 4, Grok 3 support function calling (tool use), required for agentic workflows. Agents need a model that reliably follows structured output schemas β€” test with your specific tool definitions before committing to production volumes.
Yes β€” Grok 4.1, Grok 4 accept image input alongside text. You can pass screenshots, photos, charts, and documents for analysis. Vision adds no separate line-item on most xAI models β€” you're billed for the token equivalent of the image.
Yes β€” xAI supports prompt caching (discounts for repeated context). These rates appear in the table above under "Cached /1M" and "Batch /1M." Caching pays off quickly if your prompts share a long system prompt or document prefix across many calls.
xAI has historically adjusted prices when launching new model generations, often cutting rates to stay competitive. Buzzi.ai snapshots pricing daily β€” you can subscribe to price-drop alerts on any xAI model using the "Alert me" button on its detail page.
Use the main comparison wizard to run the same calculator across xAI, Anthropic, Google, Meta, Mistral, and 20+ other providers. Set your exact workload and get a ranked cost chart in under a minute.

Look wider

Compare xAI against other providers.

Open the full wizard β€” pick a use case, set your usage, and cross-compare against OpenAI, Anthropic, Google, and 20+ more.