xAI API pricing in 2026
Developer API for xAI's Grok language, voice and image models. How xAI API charges, its plans and the alternatives.
Billing
Pay as you use
Plans
How xAI API prices
xAI API is usage-based: you pay per transaction, message or unit used rather than a fixed subscription, so there's no plan price to show. Surba tracks what you actually pay each month.
Per 1M tokens (<200K prompt): grok-4.7 $2 in / $0.50 cached / $6 out; grok-build-0.1 $1 / $0.20 / $2. Long-context prompts billed higher; batch 20% off on most models; image generation from $0.02/image.
Checked on xAI API's site on 26 Oct 2026.
Alternatives
Alternatives to xAI API
Similar tools in Surba's catalog, cheapest first.
FAQ
xAI API pricing questions
How does xAI API charge?
xAI API is usage-based: you pay for what you use (transactions, messages, compute and so on) rather than a fixed subscription, so the bill depends on volume. Per 1M tokens (<200K prompt): grok-4.7 $2 in / $0.50 cached / $6 out; grok-build-0.1 $1 / $0.20 / $2. Long-context prompts billed higher; batch 20% off on most models; image generation from $0.02/image.
AI
More AI tools
ChatGPT PlusFrom $8/user/mo · free plan
Claude ProFrom $20/user/mo · free plan
Perplexity AIFrom $20/user/mo · free plan
Fireflies.aiFrom $18/user/mo · free plan
Otter.aiFrom $16.99/user/mo · free plan
ElevenLabsFrom $6/mo · free plan
tl;dvFrom $33.64/user/mo · free plan
GitHub CopilotFrom $10/user/mo · free plan
Track xAI API and every other subscription in one place.
Surba records what you pay xAI API each month next to your subscriptions, shows your whole software spend in your currency, and flags overlapping tools.