grok-code-fast-1-0825 API pricing

xAI charges $1 per million input tokens and $2 per million output tokens for grok-code-fast-1-0825, and $0.2 per million cached input tokens. A typical request of 1,000 input and 500 output tokens costs $0.002.

Prices updated October 28, 2026
Input / 1M tokens
$1
Output / 1M tokens
$2
Cached input / 1M tokens
$0.2
Typical request
$0.002
Calculate the cost of your prompt →

grok-code-fast-1-0825 price per million tokens

Token typeStandard
Input$1
Cached input$0.2
Output$2

grok-code-fast-1-0825 supports a 256K-token context window, up to 256K output tokens, image input, tool calling and reasoning.

What grok-code-fast-1-0825 costs per request

Request1 request1,000 requests1M requests
Short chat message (300 in, 200 out)$0.0007$0.70$700.00
Typical request (1K in, 500 out)$0.002$2.00$2,000.00
Long document summary (20K in, 1K out)$0.022$22.00$22,000.00
Coding agent step (50K in, 2K out)$0.054$54.00$54,000.00

At standard rates. A token is about 4 characters of English text, so 1,000 tokens is roughly 750 words. xAI counts tokens with its own tokenizer, so the same text can be a different number of tokens.

Models with a similar price

ModelProviderInput / 1MCached input / 1MOutput / 1MTypical request
deepseek-r1DeepSeek$0.55$0.14$2.19$0.00164
gemini-3-flash-previewGoogle Gemini$0.5$0.05$3$0.002
grok-build-0.1xAI$1$0.2$2$0.002
grok-code-fastxAI$1$0.2$2$0.002
grok-4.3xAI$1.25$0.2$2.5$0.0025
grok-4.20xAI$1.25$0.2$2.5$0.0025
grok-4.20-0309-non-reasoningxAI$1.25$0.2$2.5$0.0025
grok-4.20-0309-reasoningxAI$1.25$0.2$2.5$0.0025

Other xAI models

Source: xAI pricing.