Grok 4 is xAI's language model with a 262K context window and up to 8K output tokens, available from 4 providers, starting at $3.00 / 1M input and $15.00 / 1M output. xAI's fourth-generation reasoning LLM with a 256k context window, supporting parallel tool calling, structured outputs, and multimodal image and text inputs.
Specifications
Canonical IDxai-grok-4
TypeLanguage
StatusDeprecated
CreatorxAIxAI
Providers
Context Window262K tokens
Max Output8K tokens
Input ModalitiesImageText
Output ModalitiesText
Reasoning Effortsdefault
Release Date · 1 year ago
Knowledge Cutoff · 1 year ago
Deprecation Date
Benchmarks
Intelligence Index
#144
Math Index
#19
MMLU-Pro
#18
GPQA
#65
HLE
#114
LiveCodeBench
#27
AIME
#2
IFBench
#159
Time to First Token
#562
SciCode
#94
MATH-500
#8
AIME 2025
#19
LCR
#165
TerminalBench Hard
#53
TAU2
#136
Output TPS
#160

Capabilities

Input2/5
Text✓
Image✓
Audio·
Video·
PDF·
Output1/5
Text✓
Image·
Audio·
Video·
Embedding·
Capabilities6/13
Reasoning✓
Adaptive Reasoning·
Function Calling✓
Parallel Function Calling·
Structured Outputs✓
Native JSON Schema✓
Web Search✓
URL Context·
Computer Use·
Code Execution·
File Search·
Prompt Caching✓
Assistant Prefill·

Pricing by Provider

US Dollar ($)
Per 1M tokens
ProviderStandard
Input
$ / 1M
Output
$ / 1M
$3.00$15.00
Oracle Cloud (OCI) logo
Oracle Cloud (OCI)
oci/xai.grok-4
$3.00$15.00
Replicate logo
Replicate
replicate/xai/grok-4
$7.20$36.00
Vercel AI Gateway logo
Vercel AI Gateway
vercel_ai_gateway/xai/grok-4
$3.00$15.00

Cost Calculator

US Dollar ($)
Preset:

Versions

VersionReleasedContextInput / 1MOutput / 1MStatus
Grok 4.7524K$2.00$6.00Available
Grok 4.6524K$2.00$6.00Available
Grok 4.5500K$2.00$6.00Available
Grok 4.31.0M$1.25$2.50Available
Grok 4.3 Batch1.0M$1.00$2.00Available
Grok 4.202.0M$1.25$2.50Available
Grok 4.20 Multi-Agent2.0M$1.25$2.50Available
Grok 4.20 Multi-Agent Beta2.0M$1.25$2.50Available
Grok 4.20 Non-Reasoning2.0M$1.25$2.50Deprecating
Grok 4.20 Multi-Agent2.0M$1.00$2.00Available
Grok 4262K$3.00$15.00Current

Model IDs

azure_ai/grok-4
grok-4
grok-4-0709
oci/xai.grok-4
openrouter/x-ai/grok-4
replicate/xai/grok-4
vercel_ai_gateway/xai/grok-4
x-ai/grok-4
xai-grok-4
xai/grok-4
xai/grok-4-0709
xai/grok-4-latest