Context
256K
Max output
256K
Serving providers
1
Cheapest input
$0.20 /1M
Prices are on-demand list rates. Enterprise commitments (committed-use discounts, provisioned throughput, negotiated rates) can be materially lower.

Pricing by serving provider

standard tier · per 1M tokens · click a provider to expand
Serving providerInput /1MOutput /1MEndpoints
xAICheapest$0.20$1.501
ComponentUnitStandardBatchCached
Text cached in/1M tok$0.0200
Text input/1M tok$0.2000
Text output/1M tok$1.50

Price history

input + output $/1M since we started tracking
Input Output
$0.000$0.500$1.00$1.50Aug 29Jun 22$1.50$0.200

Cost calculator

estimate your monthly spend on this model
$160
estimated / month

Model IDs

copy the exact identifier for your platform
xai/grok-code-fast

Frequently asked questions

Grok Code Fast pricing, context and availability

How much does Grok Code Fast cost?

Grok Code Fast costs $0.20 per 1M input tokens and $1.50 per 1M output tokens at its cheapest provider via xAI.

What is the context window of Grok Code Fast?

Grok Code Fast accepts up to 256K tokens of context and can return up to 256K output tokens.

What can Grok Code Fast do?

Grok Code Fast supports tool use, reasoning and prompt caching.

Other xAI models

compare pricing across the xAI lineup
Pricing verified against LiteLLM + OpenRouter + provider pages · refreshed daily

Every weekday

AI moves fast. Here's your debrief.

News, analysis, tools, and more.

For people who build with AI