Grok 2 is xAI's language model with a 131K context window and up to 4K output tokens, available from 2 providers, starting at $2.00 / 1M input and $10.00 / 1M output. xAI's second-generation flagship LLM with strong performance across reasoning, coding, and knowledge-intensive tasks.
Specifications
Canonical IDxai-grok-2
TypeLanguage
StatusActive
CreatorxAIxAI
Providers
Context Window131K tokens
Max Output4K tokens
Input ModalitiesText
Output ModalitiesText
Benchmarks
Intelligence Index
8.0
#334
MMLU-Pro
0.7
#199
GPQA
0.5
#321
HLE
0.0
#418
LiveCodeBench
0.3
#228
AIME
0.1
#105
Time to First Token
0.00s
#213
SciCode
0.3
#255
MATH-500
0.8
#101
Output TPS
0.0
#480
Elo Rating
926
#299

Capabilities

Input1/5
Text
Image·
Audio·
Video·
PDF·
Output1/5
Text
Image·
Audio·
Video·
Embedding·
Capabilities2/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
Vercel AI Gateway logo
Vercel AI Gateway
vercel_ai_gateway/xai/grok-2
$2.00$10.00
xAI logo
xAI
xai/grok-2
$2.00$10.00

Cost Calculator

US Dollar ($)
Preset:

Versions

VersionReleasedContextInput / 1MOutput / 1MStatus
Grok 4.31.0M$1.25$2.50Available
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.50Available
Grok 4.20 Reasoning2.0M$1.25$2.50Available
Grok 4.1 Fast2.0M$0.200$0.500Deprecated
Grok 4 Fast131K$0.200$0.500Deprecated
Grok 4 Fast Non-Reasoning2.0M$0.200$0.500Deprecated
Grok 4256K$3.00$15.00Deprecated
Grok 2131K$2.00$10.00Current

Model IDs

grok-2
grok-2-1212
vercel_ai_gateway/xai/grok-2
xai-grok-2
xai/grok-2
xai/grok-2-1212
xai/grok-2-latest