Grok Searcher

Grok API Cost Calculator

Updated December 2, 2026
Estimate what a Grok API workload will cost, including the reasoning tokens that are easy to forget. Prices as of December 2, 2026 from xAI’s pricing page.

Calculate your cost

Reasoning tokens
= 1,600 tokens, billed at the output rate.
Processing
Text cost per request
$0.0204
Text cost for 1,000 requests
$20.40
PartRate per 1MPer request
Input$2$0.00600
Cached input$0.5$0.00
Output$6$0.00480
Reasoning$6$0.00960

Reasoning is 47% of this bill. A lower reasoning effort could cut it.

Add tools, image and video generation

Tools $0.00 + images $0.00 + video $0.00 (image and video are not discounted by Batch or Priority). Grand total $20.40

Reasoning estimates are guesses
xAI does not publish how many reasoning tokens each effort level uses; it depends on the task. The presets multiply your output length as a rough guide. For a real number, run a few requests and read the reasoning token count from the API’s usage field, then switch to Exact.

Grok API text prices (per 1M tokens)

ModelContextInputCachedOutputPrompt ≥200k (in / cached / out)
grok-4.7500k$2$0.5$6$4 / $1 / $12
grok-4.6500k$2$0.5$6$4 / $1 / $12
grok-4.5500k$2$0.3$6$4 / $0.6 / $12
grok-4.31M$1.25$0.2$2.5$2.5 / $0.4 / $5
grok-4.20-0309-reasoning1M$1.25$0.2$2.5$2.5 / $0.4 / $5
grok-4.20-0309-non-reasoning1M$1.25$0.2$2.5$2.5 / $0.4 / $5
grok-4.20-multi-agent-03091M$1.25$0.2$2.5$2.5 / $0.4 / $5

Other published rules: the Batch API is 20% off, priority processing costs 2x, the US regional endpoint (grok-4.7 and grok-4.6 only) costs 1.1x, and server-side tools are billed on top of tokens (web search and code execution are $5 per 1,000 calls). Image generation costs $0.02 per image (grok-imagine-image) or $0.04 (grok-imagine-image-2.0); video costs $0.05, $0.08 or $0.02 per second for grok-imagine-video, video-1.5 and video-1.5-lite. Source: docs.grok.com/developers/pricing, checked December 2, 2026.

Count tokens first with the Grok token estimator, or get fewer, better requests with the prompt improver. Grok Searcher is not affiliated with xAI.

FAQ

How much does the Grok API cost?

As of December 2, 2026, grok-4.7 costs $2 per 1M input tokens, $0.50 per 1M cached input tokens and $6 per 1M output tokens for prompts under 200k tokens. grok-4.3 and the grok-4.20 models cost $1.25 input, $0.20 cached and $2.50 output. Check xAI’s pricing page for changes.

Are reasoning tokens billed?

Yes. xAI bills reasoning tokens at the same rate as completion (output) tokens. On reasoning-heavy tasks they can be most of the bill, which is why the calculator shows them separately.

What is long-context pricing?

When a request’s prompt, including cached tokens, reaches 200,000 tokens, the higher long-context rates apply to all tokens in that request, not just the part above 200k.

How do I cut Grok API costs?

Reuse a stable prompt prefix so it is served from cache, lower the reasoning effort where quality allows, keep prompts under 200k tokens, and use the Batch API (20% off) for work that does not need an instant answer.

How accurate is this calculator?

It applies xAI’s published rates to the token counts you enter. Real bills depend on actual token counts (inference adds some tokens beyond what the tokenizer shows), server-side tool calls, which are priced separately, and any price changes.

Free tools for this

All free tools →

Related guides