Grok 4.7 token cost

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.

RateUSD
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

DetailValue
ProviderxAI
Context window500K
TokenizerApprox
Last verified2026-09-23
API model idgrok-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.

Featured comparisons

Browse the full set on Compare.

Related tools

Related guides

Sources and references