← Back to API models

Grok Code Fast 1

by xAI · code specialist · budget tier

xAI's budget coding model: agentic-loop pricing for code tasks that don't need a frontier brain.

Input $0.20 / 1M
Output $1.50 / 1M
Context 256K tokens
Specialty Code
xAI Platform ↗ Updated June 10, 2026
§ API pricing

Per-token rates.

Input
$0.20/1M tokens
Prompt tokens
  • Matches Grok 4.1 Fast
  • 256K of repo context per call
  • Cheap enough for agent loops
Output
$1.50/1M tokens
Completion tokens
  • A tenth of Sonnet 4.6's $15
  • Above Codestral's $0.90
  • 10× cheaper than GPT-5.4
Context
256Ktokens
Window
  • Same as Grok 4.20 flagship
  • Fits sizable repos
  • Larger than Claude's 200K
Speed
Fastlatency tier
Throughput
  • Built for iterative loops
  • Completion-grade latency
  • High rate limits

Why Grok Code Fast exists

Coding agents burn tokens — every loop re-reads files, re-runs context, retries. Grok Code Fast 1 is priced for that reality: $0.20 input and $1.50 output per 1M tokens means an agent can iterate twenty times for less than one Sonnet 4.6 pass. It's the model you point at high-volume, low-stakes code work.

It shares the 256K window with flagship Grok 4.20, so repo-scale context isn't the sacrifice — reasoning depth is.

Capabilities

Competent code generation, edits, and explanations across mainstream languages at high speed. The use case that fits best: scripted or agentic pipelines where the task is well-defined and a retry costs fractions of a cent.

The honest weakness: hard problems. Subtle bugs, architecture, and multi-file refactors with hidden dependencies want Sonnet 4.6 or better. For pure IDE fill-in-the-middle completion, Codestral is the more specialized (and cheaper-output) tool.

Typical use cases

  • High-iteration coding agent loops
  • Bulk code generation: tests, boilerplate, migrations
  • CI helpers: lint explanations, commit summaries
  • Code search and explanation over 256K of repo context
  • Budget tier in a route-by-difficulty coding stack

Sibling and rival comparison

ModelInput / 1MOutput / 1MContext
Grok Code Fast 1$0.20$1.50256K
Codestral$0.30$0.90256K
Grok 4.20$2$6256K
Claude Sonnet 4.6$3$15200K (1M β)
GPT-5.4$2.50$15272K

The direct rival is Codestral: cheaper output and FIM completion, but less agentic framing. The frontier coding models cost 10× more and are worth it when correctness is expensive. Code Fast earns its keep as the volume layer under a smarter model.

← See all xAI / Grok plans