Grok 2

Grok 2 is a text model from xAI with a context window of 131K tokens and max output of 131K tokens. Pricing starts at 2.00 per million input tokens and 10.00 per million output tokens (cheapest at Vercel AI Gateway).

Capabilities

Vision Function Calling Reasoning JSON Schema System Messages Web Search Prompt Caching Audio Input Audio Output

Specifications

Model Keyxai/grok-2
ProviderxAI
Provider IDxai
ModeText
Canonical Namegrok-2
Context Window131K tokens
Max Output131K tokens

Pricing

TypePer 1K TokensPer 1M Tokens
Input Tokens0.00202.00
Output Tokens0.01010.00

Benchmarks

No benchmark data is available for this model.

Price Comparison by Provider

Compare prices for Grok 2 across different providers. The same model may be available through multiple providers at different price points.

Provider
Model Key
Input Price, $
Output Price, $
xAIxai/grok-22.0010.00
Vercel AI Gatewayvercel_ai_gateway/xai/grok-22.0010.00

All Variants

All available versions, regions, and API endpoints for Grok 2.

Model Key
Provider
Mode
Input Price, $
Output Price, $
Context
Max Output
Vision
Functions
vercel_ai_gateway/xai/grok-2Vercel AI GatewayText2.0010.00131K4Knoyes
xai/grok-2xAIText2.0010.00131K131Knoyes
xai/grok-2-latestxAIText2.0010.00131K131Knoyes