Grok Code Fast 1 is xAI's specialized, fast, and economical coding assistant optimized for agentic coding workflows. It excels at handling high-volume, practical software development tasks including code generation, debugging, editing, and multi-step agentic operations. Built with speed, efficiency, and cost-effectiveness in mind, Grok Code Fast 1 is particularly proficient in TypeScript, Python, Java, Rust, C++, and Go, offering deep integration into developer pipelines with structured, traceable reasoning outputs.

vs. Grok 4: Grok Code Fast 1 trades some general reasoning and tool-use sophistication for much higher speed and cost efficiency specifically in coding workflows. Grok 4 better supports complex AGI-style reasoning and tool integration beyond coding.
vs. Claude 4 Opus: Claude excels in language safety and nuanced instruction following, while Grok Code Fast 1 delivers faster, structured agentic coding with visible reasoning traces.
vs. GPT-4o: GPT-4o leads in multimodal and browsing features; Grok Code Fast 1 focuses on coding speed, throughput, and agentic tool-enabled workflows.

Measured on the AI/ML API gateway across live traffic. Figures are medians unless stated. Last updated 2026-10-12.
import requests r = requests.post( "https://api.aimlapi.com/v1/chat/completions", headers={"Authorization": "Bearer " + AIMLAPI_KEY}, json={ "model": "x-ai/grok-code-fast-1", "messages": [ { "role": "user", "content": "Hello!" } ] }, ) print(r.json())
const r = await fetch("https://api.aimlapi.com/v1/chat/completions", { method: "POST", headers: { Authorization: `Bearer ${process.env.AIMLAPI_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ "model": "x-ai/grok-code-fast-1", "messages": [ { "role": "user", "content": "Hello!" } ] }), }); console.log(await r.json());
curl -X POST https://api.aimlapi.com/v1/chat/completions \ -H "Authorization: Bearer $AIMLAPI_KEY" \ -H "Content-Type: application/json" \ -d '{"model":"x-ai/grok-code-fast-1","messages":[{"role":"user","content":"Hello!"}]}'
OpenAI-compatible — swap the base URL and it works with your existing SDK.
| Type | Price |
|---|---|
| Input | |
| Output | |
| Cached input |
| Benchmark | Score | What it measures | Source | Retrieved |
|---|---|---|---|---|
| SWE-bench Verified | 70.8% | Resolving verified real GitHub issues | Source | July 12, 2026 |
| Intelligence | 14.1 | Composite score across standardised reasoning, knowledge and problem-solving evaluations, measured independently by Artificial Analysis | Source | September 12, 2026 |
| Math | 43.3 | Composite score across standardised mathematics evaluations, measured independently by Artificial Analysis | Source | September 12, 2026 |
| Model | Input | Output | Context | Best for |
|---|---|---|---|---|
Grok Code Fast 1 This page | Coding + agents | |||
| Reasoning + agents | ||||
| Balanced coding + agents | ||||
| Long-context, multimodal & agentic workflows | ||||
| Reasoning + agents |
Grok Code Fast 1 has a 256,000 tokens context window and can return up to 255,000 tokens.
Grok Code Fast 1 takes text as input and returns text.
Use x-ai/grok-code-fast-1 as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.
Grok Code Fast 1 is priced at input $1.3 / 1M tokens, output $2.6 / 1M tokens, cached input $0.26 / 1M tokens.
Yes, Grok Code Fast 1 can stream responses as they are generated.
Grok Code Fast 1 was built by xAI .
No. It only handles text input and produces text output.
Yes, it supports parallel tool calls along with function calling and structured outputs.