Grok 4 Fast
grok-4-fastGrok 4 Fast is xAI's cost-efficient multimodal model with a massive 2M-token context window. It’s available in both reasoning and non-reasoning modes, allowing developers to toggle deeper thinking when needed. Designed for scalable performance, it balances speed, capability, and price — with reasoning controllable via the reasoning_enabled API parameter.
- Context
- 2M tokens
- Endpoint
Pricing
Quick Start
Select an endpoint and copy a working example for this model.
from openai import OpenAI client = OpenAI( api_key="YOUR_API_KEY", base_url="https://api.apertis.ai/v1") response = client.chat.completions.create( model="grok-4-fast", messages=[ {"role": "user", "content": "Hello!"} ], max_tokens=1024, temperature=0.7) print(response.choices[0].message.content) # Optional: Enable context compression to reduce token usage# response = client.chat.completions.create(# model="grok-4-fast",# messages=[{"role": "user", "content": "Hello!"}],# extra_body={"compression": {"enabled": True, "model": "gpt-4.1-mini"}}# )Supported Parameters
API docsmodelmessagesmax_tokenstemperaturetop_pstreamtoolsreasoning_effortstream_optionsthinkingextra_bodyCursor IDE Model IDs
Use these namespaced identifiers in Cursor IDE to avoid conflicts with built-in models.
Compare with Other Models
See how this model compares to others from the same provider.
Grok 4.6
Grok 4.6 is SpaceXAI's smartest frontier model, delivering top-tier performance across coding, knowledge work, and STEM reasoning. It is designed for demanding technical and professional workloads that require strong problem solving, accurate instruction following, and reliable execution. Optimized for software engineering, scientific analysis, and complex knowledge tasks, Grok 4.6 is well suited for advanced coding, research, and agentic workflows where high capability and reasoning quality are critical.
- Context
- 500K
- Input
- $2.00/M
- Output
- $6.00/M
Grok 4.20 Multi-Agent Beta
Grok 4.20 Multi-Agent Beta is a specialized variant of xAI's Grok 4.20 designed for collaborative, agent-based workflows. It enables multiple agents to operate in parallel, coordinating tool use and information synthesis to handle complex tasks. Optimized for deep research and multi-step problem solving, the model supports parallel reasoning, coordinated execution, and structured knowledge synthesis across large and complex workflows.
- Context
- 2M
- Input
- $2.00/M
- Output
- $6.00/M
Grok 4.20 Multi-Agent
Grok 4.20 Multi-Agent is a specialized variant of xAI's Grok 4.20 designed for collaborative, agent-based workflows. It enables multiple agents to operate in parallel, coordinating tool use and synthesizing information to handle complex, multi-step tasks. Optimized for deep research and large-scale problem solving, the model supports configurable reasoning effort: 4 agents for low/medium settings and up to 16 agents for high/xhigh settings, enabling scalable parallel reasoning and execution.
- Context
- 2M
- Input
- $2.00/M
- Output
- $6.00/M
Grok Build 0.1
Grok Build 0.1 is xAI's fast coding model designed specifically for agentic software engineering workflows. It supports text and image inputs with text output, and is optimized for interactive coding agents, tool use, and multi-step development tasks. Powering the Grok Build CLI, the model features a 256K token context window with effectively no text output limit, making it well suited for long-horizon coding, automation, and continuous development workflows. Currently available in early access.
- Context
- 256K
- Input
- $1.00/M
- Output
- $2.00/M