xAI API pricing: Grok model costs per million tokens
The xAI API bills Grok models per 1 million tokens. Grok 4.7 costs $2.00 input and $6.00 output; Grok 4.3 costs $1.25 and $2.50 (prompts under 200K tokens).
All xAI API plans
Per-seat prices in USD from the official pricing pages. “Annual billing” is the per-month price when billed annually, as the vendor states it; the yearly total is shown where published.
Swipe sideways to see all columns
| Plan | Monthly billing | Annual billing | Seats | Usage (as published) |
|---|
Source
docs.x.ai models documentation, checked 2026-11-05 (Asia/Colombo) and diffed against our model data with no change. USD, excluding tax (xAI doesn’t state tax treatment). The console.x.ai billing page wasn’t fetched.
Sources: xAI models and pricing
Compare with other APIs: LLM API pricing per 1M tokens.
Sources: .
xAI API rates (USD per 1M tokens, prompt < 200K / ≥ 200K)
| Feature | Grok 4.7 | Grok 4.3 |
|---|---|---|
| Input | $2.00 / $4.00 | $1.25 / $2.50 |
| Cached input | $0.50 / $1.00 | $0.20 / $0.40 |
| Output | $6.00 / $12.00 | $2.50 / $5.00 |
- Rates double for prompts of 200K tokens or more.
- Newer models listed by xAI (Grok 4.5, 4.6, Grok Imagine) are not priced here yet: price not verified.
Tax isn’t stated, so prices are shown excluding tax.
How xAI API pricing works
Long-context pricing
xAI splits pricing at 200k prompt tokens. Under that, you pay the standard rate. At 200k or more, all tokens in that request, not just the extra ones, are billed at the long-context rate. Keeping prompts under 200k, for example by trimming history or retrieving fewer documents, halves the cost.
Cached input
Repeated prompt prefixes billed as cached input cost a quarter of the normal input rate on Grok 4.7 ($0.50 vs $2.00) and about 16% on Grok 4.3 ($0.20 vs $1.25). xAI doesn’t list a separate cache-write price.
Other charges
Our model data also records these, last checked 2026-10-19: priority processing is billed at 2x, the US regional endpoint at 1.1x, and the web search tool at $5 per 1,000 calls. Grok 4.7 isn’t in xAI’s batch-discount list.
Which model?
Grok 4.3 is the cheaper choice for high-volume work: output is less than half Grok 4.7’s price. Grok 4.7 is the flagship with a 500k context window.
Related
- Compare xAI API with other AI subscriptions by team size
- API or subscription? Break-even calculator
- LLM API workload cost calculator
- ChatGPT pricing
- Claude pricing
- Cursor pricing
- Grok pricing
- GitHub Copilot pricing
- Gemini pricing
- Perplexity pricing
- Microsoft 365 Copilot pricing
- Windsurf pricing
- Midjourney pricing
- ElevenLabs pricing
- Replit pricing
- Lovable pricing
- Canva AI pricing
- Notion AI pricing
- Grammarly pricing
- Runway pricing
- HeyGen pricing
- Kling AI pricing
- DeepSeek pricing
- Suno pricing
- Bolt.new pricing
- v0 pricing
- Zapier pricing
- n8n pricing
- Make pricing
- Gamma pricing
- Otter.ai pricing
- Fireflies.ai pricing
- Jasper pricing
- Synthesia pricing
- Descript pricing
- Leonardo.Ai pricing
- Adobe Firefly pricing
- Microsoft Copilot pricing
- Mistral Le Chat pricing
- Poe pricing
- OpenRouter pricing
- Claude Code pricing
- OpenAI Codex pricing
- Kiro pricing
- OpenAI API pricing
- Anthropic API pricing
- CapCut pricing
- Intercom Fin pricing
- Pika pricing
- Together AI pricing
- Zendesk AI pricing
- Flux pricing
- Luma Dream Machine pricing
- Qwen pricing
- Ideogram pricing
- Ollama pricing
- Cline pricing
- Google Workspace with Gemini pricing
- Semrush AI pricing
- Copy.ai pricing
- Writesonic pricing
- Surfer SEO pricing
- tl;dv pricing
- Firecrawl pricing
- Sudowrite pricing
- CodeRabbit pricing
- Langfuse pricing
- Krisp pricing
- Frase pricing
- Clearscope pricing
- LangSmith pricing
- Devin pricing
- Granola pricing
- Amazon Q Developer pricing
- Read.ai pricing
- Rytr pricing
- Mem pricing
- Amp (Sourcegraph) pricing
- You.com pricing
- Wordtune pricing
- Zoom AI Companion (ZoomMate) pricing
- Recraft pricing
- Stability AI pricing
- Zed AI pricing
- LM Studio pricing
- Hailuo AI pricing
- Slack AI pricing
- ClickUp Brain pricing
- Photoroom pricing
- Hugging Face pricing
- Character.AI pricing
- JetBrains AI pricing
- Lindy pricing