grok-4.7 API pricing
xAI charges $2 per million input tokens and $6 per million output tokens for grok-4.7, and $0.5 per million cached input tokens. A typical request of 1,000 input and 500 output tokens costs $0.005, or $0.004 through the batch API.
Prices updated October 28, 2026
Input / 1M tokens
$2
Output / 1M tokens
$6
Cached input / 1M tokens
$0.5
Typical request
$0.005
grok-4.7 price per million tokens
| Token type | Standard | Batch API |
|---|---|---|
| Input | $2 | $1.6 |
| Cached input | $0.5 | $0.4 |
| Output | $6 | $4.8 |
grok-4.7 supports a 500K-token context window, up to 500K output tokens, image input, tool calling and reasoning.
What grok-4.7 costs per request
| Request | 1 request | 1,000 requests | 1M requests |
|---|---|---|---|
| Short chat message (300 in, 200 out) | $0.0018 | $1.80 | $1,800.00 |
| Typical request (1K in, 500 out) | $0.005 | $5.00 | $5,000.00 |
| Long document summary (20K in, 1K out) | $0.046 | $46.00 | $46,000.00 |
| Coding agent step (50K in, 2K out) | $0.11 | $112.00 | $112,000.00 |
At standard rates. A token is about 4 characters of English text, so 1,000 tokens is roughly 750 words. xAI counts tokens with its own tokenizer, so the same text can be a different number of tokens.
Models with a similar price
| Model | Provider | Input / 1M | Cached input / 1M | Output / 1M | Typical request |
|---|---|---|---|---|---|
| grok-4.5 | xAI | $2 | $0.3 | $6 | $0.005 |
| grok-4.6 | xAI | $2 | $0.5 | $6 | $0.005 |
| mistral-medium | Mistral | $1.5 | $0.15 | $7.5 | $0.00525 |
| mistral-medium-3 | Mistral | $1.5 | $0.15 | $7.5 | $0.00525 |
| mistral-medium-3-5 | Mistral | $1.5 | $0.15 | $7.5 | $0.00525 |
| mistral-medium-3.5 | Mistral | $1.5 | $0.15 | $7.5 | $0.00525 |
| gpt-4.1 | OpenAI | $2 | $0.5 | $8 | $0.006 |
| o3 | OpenAI | $2 | $0.5 | $8 | $0.006 |
Other xAI models
- grok-4.3 $1.25 / $2.5
- grok-4.5 $2 / $6
- grok-4.6 $2 / $6
- grok-4.20 $1.25 / $2.5
- grok-4.20-0309-non-reasoning $1.25 / $2.5
- grok-4.20-0309-reasoning $1.25 / $2.5
- grok-4.20-non-reasoning $1.25 / $2.5
- grok-4.20-reasoning $1.25 / $2.5
- grok-build-0.1 $1 / $2
- grok-code-fast $1 / $2
- grok-code-fast-1-0825 $1 / $2
Source: xAI pricing.