Earlier xAI frontier Grok kept for migration math. Prefer Grok 4.6 for new agent and coding workloads; confirm rates on xAI docs as the lineup moves quickly.
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 | $3.00 |
| Output / 1M | $15.00 |
Model details
| Detail | Value |
|---|---|
| Provider | xAI |
| Context window | 256K |
| Tokenizer | Approx |
| Last verified | 2026-08-12 |
| API model id | grok-4 |
Related tools
- Estimate API cost
- Count tokens
- Check context fit
- Estimate cache savings
- Compare batch pricing
- Cheapest LLM API