xAI Provider

xAI's Grok large language models

Available Models

Grok 4.20 Multi-Agent Beta (0309)

xaiModel Deactivated
grok-4-20-multi-agent-beta-0309
Streaming
Vision
Tools
Reasoning
JSON Output
xAI
Context: 2M
Deactivated since Mar 27, 2026
Input
$2
/M tokens
Cached
$0.2
/M tokens
Output
$6
/M tokens

Grok 4.20 Beta Reasoning (0309)

xai
grok-4-20-beta-0309-reasoning
Streaming
Vision
Tools
Reasoning
JSON Output
xAI
Context: 2M
Input
$2
/M tokens
Cached
$0.2
/M tokens
Output
$6
/M tokens

Grok 4.20 Beta Non-Reasoning (0309)

xai
grok-4-20-beta-0309-non-reasoning
Streaming
Vision
Tools
JSON Output
xAI
Context: 2M
Input
$2
/M tokens
Cached
$0.2
/M tokens
Output
$6
/M tokens

Grok Imagine Image Pro

xai
grok-imagine-image-pro
Vision
Image Generation
xAI
Context: 2k
Input
$0
/M tokens
Cached
/M tokens
Output
$0
/M tokens
+ $0.070 per request

Grok Imagine Image

xai
grok-imagine-image
Vision
Image Generation
xAI
Context: 2k
Input
$0
/M tokens
Cached
/M tokens
Output
$0
/M tokens
+ $0.020 per request

Grok 4.1 Fast Reasoning

xai
grok-4-1-fast-reasoning
Streaming
Vision
Tools
Reasoning
JSON Output
xAI
Context: 2M
Input
$0.2
/M tokens
Cached
$0.05
/M tokens
Output
$0.5
/M tokens

Grok 4.1 Fast Non-Reasoning

xai
grok-4-1-fast-non-reasoning
Streaming
Vision
Tools
JSON Output
xAI
Context: 2M
Input
$0.2
/M tokens
Cached
$0.05
/M tokens
Output
$0.5
/M tokens

Grok 4.1 Fast

xai
grok-4-1-fast
Streaming
Vision
Tools
JSON Output
xAI
Context: 2M
Input
$0.2
/M tokens
Cached
$0.05
/M tokens
Output
$0.5
/M tokens

Grok 4 Fast Non-Reasoning

xai
grok-4-fast-non-reasoning
Streaming
Vision
Tools
JSON Output
xAI
Context: 2M
Input
$0.2
/M tokens
Cached
$0.05
/M tokens
Output
$0.5
/M tokens

Grok Code Fast 1

xai
grok-code-fast-1
Streaming
Tools
JSON Output
xAI
Context: 256k
Input
$0.2
/M tokens
Cached
/M tokens
Output
$1.5
/M tokens

Grok 4 (0709)

xai
grok-4-0709
Streaming
Tools
JSON Output
xAI
Context: 256k
Input
$3
/M tokens
Cached
/M tokens
Output
$15
/M tokens

Grok 4

xai
grok-4
Streaming
Vision
Tools
JSON Output
xAI
Context: 256k
Input
$3
/M tokens
Cached
/M tokens
Output
$15
/M tokens

Grok 4 Fast Reasoning

xai
grok-4-fast-reasoning
Streaming
Vision
Tools
Reasoning
JSON Output
xAI
Context: 2M
Input
$0.2
/M tokens
Cached
$0.05
/M tokens
Output
$0.5
/M tokens

Grok 4 Fast

xai
grok-4-fast
Streaming
Vision
Tools
JSON Output
xAI
Context: 2M
Input
$0.2
/M tokens
Cached
$0.05
/M tokens
Output
$0.5
/M tokens

Grok-3 Fast

xaiModel Deactivated
grok-3-fast
Streaming
Tools
JSON Output
xAI
Context: 131.1k
Deprecated since Aug 8, 2025Deactivated since Sep 15, 2025
Input
$5
/M tokens
Cached
/M tokens
Output
$25
/M tokens

Grok-3 Mini

xaiModel Deactivated
grok-3-mini
Streaming
Tools
JSON Output
xAI
Context: 131.1k
Deprecated since Jan 30, 2026Deactivated since Feb 28, 2026
Input
$0.3
/M tokens
Cached
/M tokens
Output
$0.5
/M tokens

Grok-3

xai
grok-3
Streaming
Tools
JSON Output
xAI
Context: 131.1k
Input
$3
/M tokens
Cached
/M tokens
Output
$15
/M tokens

Grok-3 Mini Fast

xaiModel Deactivated
grok-3-mini-fast
Streaming
Tools
JSON Output
xAI
Context: 131.1k
Deprecated since Aug 8, 2025Deactivated since Sep 15, 2025
Input
$0.6
/M tokens
Cached
/M tokens
Output
$4
/M tokens

Grok-2 Vision (1212)

xaiModel Deactivated
grok-2-vision-1212
Streaming
Vision
Tools
JSON Output
xAI
Context: 32.8k
Deprecated since Aug 8, 2025Deactivated since Sep 15, 2025
Input
$2
/M tokens
Cached
/M tokens
Output
$10
/M tokens

Grok-2 (1212)

xaiModel Deactivated
grok-2-1212
Streaming
Tools
JSON Output
xAI
Context: 131.1k
Deprecated since Aug 8, 2025Deactivated since Sep 15, 2025
Input
$2
/M tokens
Cached
/M tokens
Output
$10
/M tokens