xAI flagship for coding, long-running agents, and knowledge work. Prefer this over Grok 4.6 for new budgets. Rates rise when prompts hit the 200K long-context band.
Privacy first counting
TokenCalculator counts tokens in your browser when an Exact encoding is available. Prompt text does not need to leave your device for local counting.
Pricing snapshot
USD per 1 million tokens. Verify against the provider source before you lock budget.
| Rate | USD |
|---|---|
| Input / 1M | $2.00 |
| Output / 1M | $6.00 |
| Cached input / 1M | $0.500 |
| Long-context input (≥ 200K prompt) | $4.00 |
| Long-context output (≥ 200K prompt) | $12.00 |
| Long-context cached input (≥ 200K prompt) | $1.00 |
Model details
| Detail | Value |
|---|---|
| Provider | xAI |
| Context window | 500K |
| Tokenizer | Approx |
| Last verified | 2026-09-23 |
| API model id | grok-4.7 |
Notes
Official rates: under 200K prompt tokens $2 / $0.50 cached / $6 output per 1M. At or above 200K, the whole request bills at $4 / $1 / $12. Knowledge cut-off May 2026.
More xAI models
Same provider catalog. Use these when you are comparing rates within one stack.
- Grok 2: $2.00 in / $10.00 out
- Grok 2 Vision: $2.00 in / $10.00 out
- Grok 4.6: $2.00 in / $6.00 out
- Grok 3: $1.25 in / $2.50 out
- Grok 4: $1.25 in / $2.50 out
- Grok 4 Fast: $1.25 in / $2.50 out
- Grok 3 Mini: $0.300 in / $0.500 out
- Grok 2 Mini: $0.200 in / $0.500 out
Featured comparisons
Browse the full set on Compare.
Related tools
- Estimate API cost
- Count tokens
- Check context fit
- Estimate cache savings
- Compare batch pricing
- Compare models