Grok Code Fast 1 overview
Grok Code Fast 1 by xAI
Its massive 256,000-token context window allows for handling large codebases and multi-file projects without truncation.
Grok Code Fast 1 specs
- Model ID
x-ai/grok-code-fast-1- Developer
- xAI
- Context window
- 256,000 tokens
- Max output
- 255,000 tokens
- Input
- Text
- Output
- Text
- API
- OpenAI-compatible, base URL
https://api.aimlapi.com/v1
Grok Code Fast 1 Description
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.
Performance Benchmarks
- Context Window: 256,000 tokens (max prompt + response)
- Max Output: Up to 16,000 tokens (playground capped)
- Architecture: 314B-parameter Mixture-of-Experts (MoE) for speed and capability
- Throughput: ~92 tokens per second
Performance Metrics
- Accurate across coding tasks with 93.0% coding accuracy and 75.0% instruction following accuracy
- Strong classification and knowledge performances: perfect in morality, email classification, general knowledge
- Reasoning Accuracy: 80.0%, with visible step-by-step reasoning traces for developer inspection and steering
- Competitive speed and throughput supporting real-time coding workflows
Key Capabilities
- Massive long-context handling for entire codebases or multi-file projects
- Agentic coding with native function/tool calls and multi-step operation chaining
- Traceable reasoning outputs revealing intermediate steps to boost transparency and steerability
- Multi-language support for practical software stacks including major modern programming languages
- Economical pricing designed for high-volume developer use and iterative workflows
Optimal Use Cases
- Agentic coding assistants for autonomous code writing, debugging, and system integration
- Large-scale codebase analysis and multi-file editing without coherence loss
- Coding research and evaluation demanding precise reasoning and logic transparency
- Integration into CI/CD pipelines with high throughput and cost efficiency
Comparison with Other Models
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.
Use cases
- Agentic coding assistants for autonomous code writing, debugging, and system integration
- Large-scale codebase analysis and multi-file editing without coherence loss
- Coding research and evaluation demanding precise reasoning and logic transparency
- Integration into CI/CD pipelines with high throughput and cost efficiency
Capabilities
- Function calling
- Streaming
- Structured outputs
- Reasoning
Grok Code Fast 1 benchmarks by
Artificial Analysis
See how Grok Code Fast 1 scores on independent evaluations. Data retrieved Nov 3, 2026.
Benchmark results
Compare 10 models available on AI/ML API across 5 independent benchmarks.
Humanity's Last Exam
Expert-written questions across academic subjects.
GPQA Diamond
Graduate-level science questions written to resist web search.
AA-LCR
Reasoning across long documents of about 100k tokens.
IFBench
Following precise instructions about the shape of the answer.
τ²-Bench Telecom
Customer support agent tasks with tool calls.
Grok Code Fast 1 API pricing
| Usage | Price | Unit |
|---|---|---|
| Input | $1 | 1M tokens |
| Output | $2 | 1M tokens |
| Cached input | $0.2 | 1M tokens |
Prices from the AI/ML API price list, checked on Nov 4, 2026.
Grok Code Fast 1 vs other models: token prices
AI/ML API input and output rates for 5 models, per million tokens.
| Model | Input | Output |
|---|---|---|
| $1 | $2 | |
| $1 | $2 | |
| $2 | $6 | |
| $2 | $6 | |
| $2 | $6 |
How to use the Grok Code Fast 1 API
View docsBuild with your agent
Give your agent the model details, code and documentation.
1Get your API key
Create API keyexport AIMLAPI_KEY="8f2b4c7d9a1e6b3f…"2Make your first request
curl '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": "Write a haiku about the ocean."
}
]
}'import os
import requests
headers = {
"Authorization": f"Bearer {os.environ['AIMLAPI_KEY']}",
"Content-Type": "application/json",
}
payload = {
"model": "x-ai/grok-code-fast-1",
"messages": [
{
"role": "user",
"content": "Write a haiku about the ocean."
}
]
}
response = requests.post("https://api.aimlapi.com/v1/chat/completions", headers=headers, json=payload, timeout=120)
response.raise_for_status()
print(response.json())const response = 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": "Write a haiku about the ocean."
}
]
}),
});
if (!response.ok) throw new Error(`HTTP ${response.status}`);
console.log(await response.json());Related articles
Grok Code Fast 1 FAQ
What is the context window of Grok Code Fast 1?
Grok Code Fast 1 has a 256,000 tokens context window and can return up to 255,000 tokens.
What inputs and outputs does Grok Code Fast 1 support?
Grok Code Fast 1 takes text as input and returns text.
What is the model ID for Grok Code Fast 1?
Use x-ai/grok-code-fast-1 as the model id. Requests go to https://api.aimlapi.com/v1/chat/completions.
How much does Grok Code Fast 1 cost?
Grok Code Fast 1 costs $1 input and $2 output per 1M tokens on AI/ML API, billed as you go with no subscription.
Does Grok Code Fast 1 support streaming?
Yes, Grok Code Fast 1 can stream responses as they are generated.
Who created Grok Code Fast 1?
Grok Code Fast 1 was built by xAI .
Is Grok Code Fast 1 a multimodal model?
No. It only handles text input and produces text output.
Can Grok Code Fast 1 call multiple tools at once?
Yes, it supports parallel tool calls along with function calling and structured outputs.

