xAI API Pricing (Grok API)
xAI publishes official API prices for 8 text models: Grok 4.7, Grok 4.6, Grok 4.5, Grok 4.3 and more. Input costs from $1 to $2 and output from $2 to $6 per 1M tokens. The lowest output price is Grok Build 0.1 at $2; the highest is Grok 4.5 at $6. These prices were checked by hand on the xAI API pricing page (docs.x.ai) on Oct 10, 2026.
Prices checked Oct 10, 2026
Models
8
Lowest output / 1M
$2
Grok Build 0.1
Unit
Per 1M tokens
Prices checked
Oct 10, 2026
Grok API prices by model
Official prices per 1 million tokens from xAI's pricing page (source, checked Oct 10, 2026).
| Model | Input | Output | Cached input | Context window |
|---|---|---|---|---|
| Grok 4.7 | $2 | $6 | $0.50 | 500K |
| Grok 4.6 | $2 | $6 | $0.50 | 500K |
| Grok 4.5 | $2 | $6 | $0.30 | 500K |
| Grok 4.3 | $1.25 | $2.50 | $0.20 | 1M |
| Grok 4.20 Reasoning | $1.25 | $2.50 | $0.20 | 1M |
| Grok 4.20 Non-Reasoning | $1.25 | $2.50 | $0.20 | 1M |
| Grok 4.20 Multi-Agent | $1.25 | $2.50 | $0.20 | 1M |
| Grok Build 0.1 | $1 | $2 | $0.20 | 256K |
Pricing notes
- Prompts of 200K tokens or more are billed at the long-context rate for every token in the request, double the standard rate (for example Grok 4.7: $4 input, $1 cached input, $12 output).
- Priority processing costs 2× the standard rate. Batch requests are 20% off for Grok 4.3 and the Grok 4.20 models.
- xAI does not give free API credits; the API is billed per token. Only the console playground is free.
Grok API pricing FAQ
How much does the Grok API cost?
xAI's official API charges from $1 to $2 per 1M input tokens and from $2 to $6 per 1M output tokens across the 8 models listed here. Prices checked Oct 10, 2026.
What is the cheapest Grok API model?
Grok Build 0.1 has the lowest output price: $1 per 1M input tokens and $2 per 1M output tokens.
Is cached input cheaper on the Grok API?
Yes. 8 of the 8 models listed here have a lower cached-input price. For example, Grok 4.7 charges $0.50 per 1M cached input tokens instead of $2.
Related pricing
BiWu.Ai lists public API prices from official pricing pages for reference and does not sell API access. Long-context, batch and priority rates can differ, and prices can change without notice. Check xAI's pricing page before you build on it.