Home/xAI/Grok Code Fast
xAI pricing

Grok Code Fast API Pricing & Cost Calculator

Grok Code Fast is priced at $1.00 input / $2.00 output per 1M tokens, with a 256K context window and 256K max output. Cached input $0.20/1M. That is 20% cheaper per call than Grok 4.3 ($1.25/$2.50). A 1,000-in / 500-out call costs $0.00200.

Listed automatically on 2026-09-23

Prices and limits come straight from the LiteLLM registry and are verified daily. The description is generated from those numbers and has not yet been reviewed by a person, so it may miss context about how this model relates to others in its family.

Input
$1.00
per 1M tokens
Output
$2.00
per 1M tokens
Context window
256K
tokens
Released
Cutoff
≈ Estimated tokenizer·$1.00 in·$2.00 out (per 1M)
Quick start with a use case
Total cost per call$0.002000
Input$0.001000
Output$0.001000
Cost comparison
Standard
$0.002000
With Caching
$0.001600
Save 20% ↓
With Batch
Not supported
Cutting costs? Open models start at $0.28/1M

DeepSeek, Kimi & 200+ open models on Novita AI — often 5–20x cheaper than proprietary APIs for comparable tasks.

Try Novita AI

Affiliate link — we may earn a commission at no extra cost to you.

Detailed pricing

Grok Code Fast pricing breakdown

All pricing dimensions including caching and batch discounts.

TypePrice (per 1M tokens)
Input$1.0000
Output$2.0000
Cached input$0.2000
Cutting costs? Open models start at $0.28/1M

DeepSeek, Kimi & 200+ open models on Novita AI — often 5–20x cheaper than proprietary APIs for comparable tasks.

Try Novita AI

Affiliate link — we may earn a commission at no extra cost to you.

Last verified 2026-09-23 · xAI official pricing · ⚠️ Spotted a wrong price? Report in 30s →

How it compares

Grok Code Fast vs alternatives

Single-call cost (1000 input + 500 output tokens) ranked from cheapest.

ModelPer call
Grok Code Fast
xAI · this page
$0.002000
GPT-6 Luna
OpenAI
$0.000350
DeepSeek V3.2
DeepSeek
$0.000480
GPT-5.6 Luna
OpenAI
$0.000800
DeepSeek V4-Flash
DeepSeek
$0.000900
Gemini 3.1 Flash Lite
Google
$0.001000
Recommended use

When to choose Grok Code Fast

Grok Code Fast shines for general-purpose tasks, complex multi-step reasoning, image and document understanding, high-throughput, and low-latency tasks. Token counts are estimated within ~10-20% margin.

Context window of 256K tokens handles long conversations and large documents.
Prompt caching available — significant savings for repeated system prompts.
Tool / function calling supported.
FAQ

Frequently asked questions

Grok Code Fast costs $1.00 per 1M input tokens and $2.00 per 1M output tokens. A typical chat call (1000 input + 500 output tokens) costs approximately $0.0020. Use the calculator above to estimate your specific use case.
Grok Code Fast supports a 256K token context window with a max output of 256,000 tokens.
Yes. Cached input is priced at $0.20 per 1M tokens — 80% cheaper than uncached input. This is especially valuable for repeated system prompts, long-context retrieval, and chat threads with shared history.
Yes, Grok Code Fast accepts image input. Vision token pricing is generally calculated based on image dimensions and folded into the input token count. Specific image-specific pricing varies — refer to xAI's official documentation.
Token counts for Grok Code Fast are estimated from character ratios (~10-20% margin). Cost calculations use prices verified on 2026-09-23. For final billing accuracy, always verify with xAI's usage dashboard.
Grok Code Fast does not currently support fine-tuning. Consider another model in the xAI family if fine-tuning is required.