xAI API
Grok 4.5 API Pricing 2026 — Cost per 1 Million Tokens
Current Grok 4.5 API pricing from xAI per 1 million tokens, including input, output and cached-token rates when available.
| Model | Rate | Price / 1M tokens |
|---|---|---|
| Grok 4.5 xAI's current flagship Grok model with strong reasoning and multimodal input. 500K context · text/image input · reasoning, tools and structured output. For requests at or above 200K context, xAI lists higher long-context rates; rows marked long-context show those prices. | Input — <200K context | $2 |
| Grok 4.5 | Cached input — <200K | $0.3 |
| Grok 4.5 | Output — <200K | $6 |
| Grok 4.5 | Input — ≥200K context | $4 |
| Grok 4.5 | Cached input — ≥200K | $0.6 |
| Grok 4.5 | Output — ≥200K | $12 |
How API token cost is calculated
Multiply the number of tokens by the provider rate, then divide by 1,000,000.
cost = tokens × price per 1M ÷ 1,000,000
Example: 250,000 input tokens at $2 / 1M = $0.50.