x-AI/Grok-Code-Fast 1

xAIMCP Tool CallReasoning
xai/grok-code-fast-1Closed API

Fast Grok model for responsive chat, reasoning, and tool-assisted work

Benchmark Pricing$0.20 / 1M in$1.50 / 1M out$0.02 cache read
Context: 256,000 tokens•Max Output: 10,000 tokens•Released: 2025-09-02

TECHNICAL SPECIFICATIONS

Context Window256,000256K tokens
Max Output10,00010K tokens
LicenseProprietaryCloud API only
Input Modalities
Text
Function / Tool CallingSupported (MCP Ready)
Structured OutputsGuaranteed Schema

MODEL CONTEXT PROTOCOL (MCP) READINESS

✓ x-AI/Grok-Code-Fast 1 natively supports OpenAI / Anthropic format tool calling and is fully compatible with MCP servers and agent loops.

MCP Context Window Recommendations

With a context capacity of 256,000 tokens, this model can handle moderately large MCP tool definitions and multi-turn conversation logs comfortably.

API CALL INVOCATION EXAMPLE

// Example: Calling x-AI/Grok-Code-Fast 1 via OpenAI SDK
import OpenAI from "openai";

const client = new OpenAI({
  apiKey: process.env.XAI_API_KEY,
});

const response = await client.chat.completions.create({
  model: "xai/grok-code-fast-1",
  messages: [{ role: "user", content: "Hello! Can you inspect MCP tools?" }],
});

console.log(response.choices[0].message.content);

PRICING BY PROVIDER

5 providers
Poexai/grok-code-fast-1
$0.20 / $1.50$0.02 cache
Abacusgrok-code-fast-1
$0.20 / $1.50
FrogBotgrok-code-fast-1
$0.20 / $1.50$0.02 cache
Jiekou.AIgrok-code-fast-1
$0.19 / $1.43$0.02 cache
Heliconegrok-code-fast-1
$0.20 / $1.50$0.02 cache

Rates in USD per 1M tokens. Rates synchronized from models.dev public catalog.

Prompt Caching Active

This model supports prompt caching at $0.02 / 1M tokens, saving up to 90% on repetitive MCP tool definitions and system instructions.

MODEL RESOURCES