x

xAI

Major Foundation Lab19 Canonical Models

xAI foundation models, inference API endpoints, and pricing.

Official Provider Docs
•Package: @ai-sdk/xai•Env Key: XAI_API_KEY

Models by xAI

Specifications, context windows, and pricing for xAI models

19 models
X-Ai/Grok-4-Fast-Reasoning
xai/grok-4-fast-reasoning•xAI
2M ctx

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

2M out maxVision
In: $0.20 • Out: $0.50
xAI
Grok 4.1 Fast (Reasoning)
xai/grok-4.1-fast-reasoning•xAI
2M ctx

xAI's fast agentic tool-calling model with a 2M context window and built-in reasoning

30K out maxVision
In: $0.20 • Out: $0.50
xAI
X-Ai/Grok-4-Fast-Non-Reasoning
xai/grok-4-fast-non-reasoning•xAI
2M ctx

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

2M out maxVision
In: $0.20 • Out: $0.50
xAI
Grok 4.1 Fast
xai/grok-4.1-fast•xAI
2M ctx

xAI's fast agentic tool-calling model with a 2M context window; non-reasoning variant for low-latency responses

30K out maxVision
In: $0.20 • Out: $0.50
xAI
Grok 4.3
xai/grok-4.3•xAI
1M ctx

xAI's default Grok for chat, coding, agentic tools, and lower hallucination risk

30K out maxVisionPDFArtificial Analysis Intelligence Index: 53 index score
In: $1.25 • Out: $2.50
xAI
Grok 4.20 (Reasoning)
xai/grok-4.20-0309-reasoning•xAI
1M ctx

Reasoning Grok for document-heavy analysis and long-horizon tool use

30K out maxVisionPDF
In: $1.25 • Out: $2.50
xAI
Grok 4.20 (Non-Reasoning)
xai/grok-4.20-0309-non-reasoning•xAI
1M ctx

Grok model for agentic tool use, reasoning, coding, and live assistance

30K out maxVisionPDF
In: $1.25 • Out: $2.50
xAI
Grok 4.6
xai/grok-4.6•xAI
500K ctx

xAI's frontier model for long-running agents, coding, knowledge work, and visual projects

500K out maxVisionCursorBench: 40.4 score
In: $2.00 • Out: $6.00
xAI
Grok 4.7
xai/grok-4.7•xAI
500K ctx

xAI's frontier model for long-running agents, coding, knowledge work, and visual projects

500K out maxVisionPDFCursorBench: 46.3 score
In: $2.00 • Out: $6.00
xAI
Grok 4.5
xai/grok-4.5•xAI
500K ctx

xAI's Grok model for chat, coding, agentic tools, and lower hallucination risk

500K out maxVisionSWE-Bench Pro: 64.7 resolve rate
In: $2.00 • Out: $6.00
xAI
x-AI/Grok-Code-Fast 1
xai/grok-code-fast-1•xAI
256K ctx

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

10K out max
In: $0.20 • Out: $1.50
xAI
Grok Build 0.1
xai/grok-build-0.1•xAI
256K ctx

Fast Grok coding model tuned for agentic engineering and iterative edits

256K out maxVisionPDF
In: $1.00 • Out: $2.00
xAI
Grok Voice Transcribe 2.0
xai/grok-voice-transcribe-2.0•xAI
128K ctx

Speech-to-text model with word-level timestamps, speaker diarization, multichannel audio, and streaming

4.1K out max
In: Free • Out: Free
xAI
Grok Imagine Image 2.0
xai/grok-imagine-image-2.0•xAI
64K ctx

Image model for prompt-driven generation, editing, and visual design workflows

4.1K out maxVision
In: Free • Out: Free
xAI
Grok Imagine Image
xai/grok-imagine-image•xAI
16K ctx

Image model for prompt-driven generation, editing, and visual design workflows

4.1K out maxVision
In: Free • Out: Free
xAI
Grok Imagine Image Quality
xai/grok-imagine-image-quality•xAI
16K ctx

Higher-fidelity Grok Imagine image model for prompt-driven generation, editing, and visual design workflows

4.1K out maxVision
In: Free • Out: Free
xAI
Grok TTS
xai/grok-tts•xAI
15K ctx

Convert text into spoken audio with a single API call. The API supports a rich set of expressive voices, inline speech tags for fine-grained delivery control, and output formats from high-fidelity MP3 to telephony-optimized μ-law.

15K out max
In: Free • Out: Free
xAI
Grok Imagine Video 1.5 Lite
xai/grok-imagine-video-1.5-lite•xAI
1K ctx

Cost-efficient video model for text-to-video and image-to-video generation

4.1K out maxVision
In: Free • Out: Free
xAI
Grok Imagine Video 1.5
xai/grok-imagine-video-1.5•xAI
1K ctx

Video model for text-to-video, image-to-video, and reference-to-video generation with optional voice references

4.1K out maxVision
In: Free • Out: Free
xAI