Skip to main content
TokenCost logoTokenCost

Grok Code Fast

Last verified July 27, 2026 · xAI pricing ↗

$0.200/1M input · $1.50/1M output · 256K context · xAI

Grok Code Fast last cost $0.200 per 1M input tokens and $1.50 per 1M output tokens from xAI, with a 256K-token context window. A typical chat reply (1,500 tokens in, 400 out) costs $0.0009, or $9.00 per 10,000 requests.

Retired

Not generally available

xAI has shut Grok Code Fast down. You cannot buy it at the rate below. The price is kept so past spend and old estimates still reconcile, and it is excluded from the calculator’s default model list and from every ranking.

xAI’s own page ↗

Count Tokens

—
Tokens
—
Input Cost
—
Output Cost

Estimate Monthly Cost

Monthly Cost Estimator

Quick:
<$0.0001/mo

Pick a preset above or enter custom usage

What Grok Code Fast Costs Per Request

At $0.200 per 1M input and $1.50 per 1M output tokens, before caching or batch discounts.

WorkloadInput / output tokensPer requestPer 10,000 requests
Chat reply1,500 / 400$0.0009$9.00
RAG answer over retrieved docs8,000 / 600$0.0025$25.00
Coding-agent step30,000 / 2,000$0.0090$90.00

Grok Code Fast vs Similarly Priced Models

Nearest buyable models by price, with the RAG answer above (8,000 in / 600 out) priced on each.

ModelInput /1MOutput /1MContextRAG answer
Grok Code Fast xAI$0.200$1.50256K$0.0025
Grok Build 0.1 xAI$1.00$2.00256K$0.0092
Hy4 Tencent$0.417$1.251.0M$0.0041
Gemini 3.1 Flash-Lite Google$0.250$1.501.0M$0.0029

Alternatives to Grok Code Fast

Pricing Details

xAIRetired. xAI shut down slug grok-code-fast-1 on May 15, 2026 at 12:00 PM PT. Replacement named by xAI: grok-build-0.1 at $1/$2. Price kept for historical comparison. Estimated tokens (different tokenizer).
Input / 1M tokens
$0.2
Output / 1M tokens
$1.5
Context Window
256K
Max Output
16K

Price History

No price change recorded since 2026-07-27, when this site started tracking this model.

Frequently Asked Questions

Common questions about Grok Code Fast pricing and usage

How much does Grok Code Fast cost?
Grok Code Fast costs $0.2 per 1 million input tokens and $1.5 per 1 million output tokens. This pricing is set by xAI.
What tokenizer does Grok Code Fast use?
Grok Code Fast uses the cl100k_base tokenizer. This tokenizer has a vocabulary of ~100,000 tokens and is widely used across many models.
What is Grok Code Fast's context window?
Grok Code Fast supports a context window of 256K tokens (256,000 tokens). The maximum output length is 16K tokens.
How does Grok Code Fast compare to other models?
On an 8,000-token-in, 600-token-out RAG answer, Grok Code Fast costs $0.0025 per request. The nearest-priced alternatives cost: Grok Build 0.1 (xAI) $0.0092, Hy4 (Tencent) $0.0041, Gemini 3.1 Flash-Lite (Google) $0.0029. The table above lists their full rates and context windows.
How do I count tokens for Grok Code Fast?
Use the token counter at the top of this page or visit the homepage calculator. Paste your text and it will show the exact token count and cost for Grok Code Fast using the cl100k_base tokenizer.