Grok Code Fast 1

xAI chatreasoningtool_usecode Long

API ID: x-ai/grok-code-fast-1

Input Price
$0.20
/1M tokens
Output Price
$1.50
/1M tokens

About Grok Code Fast 1

Grok Code Fast 1 is a speedy and economical reasoning model that excels at agentic coding. With reasoning traces visible in the response, developers can steer Grok Code for high-quality work flows.

๐Ÿ’ฐ
Price Ranking
#910 lowest price among 1240 Chat models

Model Specifications

Context Length
256k
Max Output
10k
Release Date
2025-08-26
Capabilities
chat reasoning tool_use code
Input Modalities
text
Output Modalities
text

Best For

  • Complex reasoning, math problems, multi-step logic
  • Code generation, debugging, code review, refactoring
  • Conversations, content writing, general assistance

Consider Alternatives For

  • Image understanding (needs vision capability)
  • Simple Q&A (cheaper models available)

๐Ÿ’ฐ Real-World Cost Examples

Estimated monthly costs for common use cases

Personal AI Assistant
$0.54
/month
50 conversations/day, ~500 tokens each
Code Copilot
$4.56
/month
200 completions/day, ~1k tokens each
Customer Service Bot
$16.50
/month
1000 tickets/day, ~800 tokens each
Data Analysis Pipeline
$22.50
/month
500 analyses/day, ~2k tokens each

xAI Model Lineup

Compare all models from xAI to find the best fit

Model Input Output Context Capabilities
Grok Code Fast 1 Current Free Free 256k chat reasoning tool_use code
Grok 2 Vision 1212 Free Free 33k chat vision
Grok 2 Vision 1212 Free Free 33k chat vision
Grok Vision Beta Free Free 8k chat vision
Grok Vision Beta Free Free 8k chat vision
Grok 2 Free Free 33k chat

Similar Models from Other Providers

Cross-brand alternatives with similar capabilities

Sao10K Llama 3.1 Euryale 70B v2.2
Input: $0.85
Output: $0.85
Context: 131k
Thinkingmachines Inkling Small
Input: $0.50
Output: $1.20
Context: 524k
DeepSeek DeepSeek V3
Input: $0.40
Output: $1.30
Context: 164k
Alibaba Qwen Qwen3 VL 30B A3B Thinking
Input: $0.13
Output: $1.56
Context: 262k

๐Ÿš€ Quick Start

Get started with Grok Code Fast 1 API

OpenAI-compatible SDK
from openai import OpenAI

client = OpenAI(
    base_url="https://api.provider.com/v1",
    api_key="YOUR_API_KEY"
)

response = client.chat.completions.create(
    model="x-ai/grok-code-fast-1",
    messages=[
        {"role": "user", "content": "Hello!"}
    ]
)
print(response.choices[0].message.content)