xAI API pricing

Grok 4.7 pricing

Input / 1M tokens
$2
Output / 1M tokens
$6
Cached input / 1M
$0.50

Prompts over 199,999 tokens cost $4 in and $12 out per million, for the whole request.

Source: xAI pricing, checked 1 Nov 2026. API name: grok-4.7.

Price your prompt on Grok 4.7

What a prompt costs on Grok 4.7

ExampleTokens in / outCost1,000 a day, per month
A short question and answer50 / 300$0.0019$57.00
A one-page document summarised700 / 400$0.0038$114.00
A 300-line code file reviewed4,000 / 1,200$0.015$456.00
A 50-page report summarised35,000 / 1,500$0.079$2,370

Token sizes are typical, not exact. Replies include any thinking the model does.

Other Grok models

Grok 4.3Grok Build 0.1

FAQ

How much does Grok 4.7 cost?

$2 per million input tokens and $6 per million output tokens on xAI's standard API tier, and $0.50 per million for cached input. Checked 1 Nov 2026.

What does one prompt cost on Grok 4.7?

A 1,000-token prompt with a typical medium-length reply costs about $0.0068. Paste your own prompt into the calculator for an exact figure.