Grok 4

Vercel Ai GatewayText

Grok 4 is a text model from Vercel Ai Gateway with a context window of 256K tokens and max output of 256K tokens. Pricing starts at $3.00 per million input tokens and $15.00 per million output tokens (cheapest at Azure AI).

Specifications

Model Keyvercel_ai_gateway/xai/grok-4
ProviderVercel Ai Gateway
LiteLLM Providervercel_ai_gateway
ModeText
Canonical Namegrok-4
Context Window256K tokens
Max Output256K tokens

Capabilities

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

Pricing

TypePer 1K TokensPer 1M Tokens
Input Tokens$0.0030$3.00
Output Tokens$0.015$15.00

Price Comparison by Provider

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

Provider
Model Key
Input Price
Output Price
Azure AIazure_ai/grok-4$3.00$15.00
OpenRouteropenrouter/x-ai/grok-4$3.00$15.00
Replicatereplicate/xai/grok-4$7.20$36.00
Vercel Ai Gatewayvercel_ai_gateway/xai/grok-4$3.00$15.00
xAIxai/grok-4$3.00$15.00
Ocioci/xai.grok-4$3.00$0.150

Similar Models

Models with similar capabilities and context window size.

Model
Provider
Mode
Input Price
Output Price
Context
Max Output
Vision
Functions
Grok Code Fast 1 0825xAIText$0.200$1.50256K256Knoyes
Jamba 1 5 Mini V1AWS BedrockText$0.200$0.400256K256Knono
Jamba 1.5AI21 LabsText$0.200$0.400256K256Knono
Jamba 1.5 MiniGoogle Vertex AIText$0.200$0.400256K256Knono
Jamba 1.5 MiniGoogle Vertex AIText$0.200$0.400256K256Knono
Labs Devstral Small 2512Mistral AIText$0.100$0.300256K256Knoyes
Mamba Codestral 7B V0.1OvhcloudText$0.190$0.190256K256Knono
Ministral 3 14B Instruct 2512Fireworks AIText$0.200$0.200256K256Knono
Ministral 3 3B Instruct 2512Fireworks AIText$0.100$0.100256K256Knono
Ministral 3 8B Instruct 2512Fireworks AIText$0.200$0.200256K256Knono