xAI API
xAI's official API spanning text, image, video, and voice modalities; flagship grok-4.3 at $1.25/$2.50 per 1M tokens with live search tools included
Core models
xAI's current flagship text model with 1M context at $1.25/$2.50 per 1M tokens; supports Web Search, X Search, code execution, and other server-side tools—the go-to for production agent applications needing live information.
The reasoning-mode variant of Grok 4.20—shows step-by-step chain-of-thought, suited to math proofs, complex logical analysis, and tasks requiring transparent reasoning; 1M context at $1.25/$2.50 per 1M tokens.
The standard-mode variant of Grok 4.20—skips chain-of-thought for faster responses, suited to everyday Q&A and code generation tasks that do not require visible reasoning; 1M context at $1.25/$2.50 per 1M tokens.
The multi-agent variant of Grok 4.20 designed for orchestration pipelines that decompose complex problems into parallel sub-tasks; 1M context at $1.25/$2.50 per 1M tokens, same price as the standard variants.
The lowest-cost text model in xAI's API with 256K context at $1.00/M input and $2.00/M output; suited to high-frequency batch inference, cost-sensitive applications, and lightweight production calls that do not require ultra-long context.
Additional core model names still appear above, with full details on the latest official page.
Plan details
grok-4.3
Flagship text modelRecommendedgrok-4.20
Reasoning & standard variantsgrok-build-0.1
Compact efficientGrok Imagine
Image & video generationNotes
- Server-side tool invocations are billed per call (Web Search/X Search/code execution at $5/1k each), in addition to token costs; once tools are enabled, the agent decides how many calls to make, so complex queries can scale costs linearly with tool usage.
- Batch API supports all text/language models at 20%–50% off standard rates, typically completing within 24 hours; image/video generation can be queued via Batch API but is billed at standard rates without the discount.
- Both grok-4.3 and grok-4.20 support 1M token context; grok-build-0.1 has a 256K context and is the lowest-cost text option ($1.00/$2.00), suited to batch reasoning tasks that do not need ultra-long context.
- Priority Processing charges 2× token rates with higher scheduling priority on Chat Completions/Responses text requests; docs.x.ai states all prices are in USD.
Supported coding tools
Pricing and model data sourced from official vendor websites