xAI · Pricing & cost calculator

Grok pricing

xAI's flagship. Strong on current events (real-time X access).

Input tokens

$0.00500

per 1,000 tokens

Output tokens

$0.01500

per 1,000 tokens

Context window

128,000

tokens max

Prices sourced from xAI's public API rate card. Last reviewed April 2026.

Calculate your Grok spend

Drag the sliders. The math runs in your browser.

Per request

$0.015000

at 1,500/500 tokens

Monthly spend

$150

10,000 requests × $0.015000

Could save ~42% with a similar-quality alternative

Switch from Grok to GPT-4o and save $62.50/month

Same workload at 1,500/500 tokens × 10,000 req/month: $150 $88. 2× cheaper on input.

TrackCost's gateway auto-detects which requests are safe to route to the cheaper model and flags the ones that need Grok's full capability. You stay in control — we surface the opportunity.

When should you use Grok?

  • Current events / news summarization
  • X/Twitter data access

Grok pricing FAQ

How much does Grok cost per 1,000 tokens?

Grok costs $0.00500 per 1,000 input tokens and $0.01500 per 1,000 output tokens as of the current xAI API pricing.

What is a cheaper alternative to Grok?

GPT-4o is significantly cheaper than Grok (2× cheaper on input) and often works fine for tasks that don't need Grok's full capability. TrackCost automatically suggests model downgrades where safe.

How can I reduce my Grok API costs?

The three highest-leverage ways: (1) route requests to a cheaper model where possible, (2) cache identical requests so you don't pay twice for the same response, (3) set hard monthly budgets that block requests when exceeded. TrackCost automates all three at the gateway layer.

What's the context window for Grok?

Grok supports up to 128,000 tokens of context. For comparison with other models, use the TrackCost savings calculator.

Compare pricing across other models