Grok 2
grok-2Pricing
List prices at Vercel AI Gateway, in US dollars per million tokens.
| Tier | Input / 1M | Output / 1M | |
|---|---|---|---|
| Standard | $2.00 | $10.00 |
What it costs a month
At Vercel AI Gateway list prices, 30 days.
- Chat assistant5,000 requests a day, 2K in / 0.5K out$1,350
- RAG over documents2,000 requests a day, 8K in / 0.6K out$1,320
- Coding agent1,000 requests a day, 40K in / 2K out$3,000
- Overnight batch20,000 requests a day, 4K in / 0.4K out$7,200
Where to run it
1 host serve Grok 2. The comparison is on blended price, 3 parts input to 1 part output.
| Host | In / out per 1M | Model id | |
|---|---|---|---|
Vercel AI GatewayGateway grok-2 | $2.00 / $10.00 | grok-2 |
Capabilities
Core
- Streaming
- Function calling
- JSON mode
- Structured outputs
Multimodal
- Vision
- Image input
- Audio
- Image generation
- Video
Advanced
- Reasoning
- Tool calling
- MCP
- Prompt caching
- Batch API
- Embeddings
- Takes in
- Text
- Produces
- Text
Cheaper alternatives
Current models that cost less and keep most of what this one can do: tools, vision, reasoning, structured output, caching and enough context.
Same model, cheaper host
No host sells it for less than Vercel AI Gateway.
Smaller xAI models
- 25% less
- 69% less
- 25% less
Other frontier labs
- 25% less
- 50% less
- 95% less
- 58% less
Open-weight picks
- 0% less
- 25% less
- 50% less
- 57% less
Model line
Newer and older versions, at each lab's own price.
Call it
Using Vercel AI Gateway's API.
from litellm import completion
response = completion(
model="vercel_ai_gateway/grok-2",
messages=[{"role": "user", "content": "Hello"}],
)
print(response.choices[0].message.content)Quick answers
How much does Grok 2 cost?
On Vercel AI Gateway, Grok 2 costs $2.00 per million input tokens and $10.00 per million output tokens.
Which APIs offer Grok 2?
Grok 2 runs on 1 API: Vercel AI Gateway.
What is Grok 2's context window?
131K tokens, with up to 4K tokens in one reply.
Is Grok 2 being retired?
No retirement date is scheduled for it on any API we track.
Is there a newer version of Grok 2?
Yes. Grok 4.7 is the newest model in this line, released on 21 Sep 2026.
What are cheaper alternatives to Grok 2?
Models that cost less and keep most of what it can do: Grok 4.7 on xAI (25% less), Gemini 4 Hydrogen on Google AI Studio (25% less), GPT-6.1 Terra on OpenAI (50% less) and Kimi K3.1 Pro on Databricks (0% less). Savings are on a mix of 3 input tokens to 1 output token.
What is Grok 2's API model id?
Use grok-2 with Vercel AI Gateway.
Sources
Raw catalog entry for grok-2 on Vercel AI Gateway
{
"input_cost_per_token": 0.000002,
"litellm_provider": "vercel_ai_gateway",
"max_input_tokens": 131072,
"max_output_tokens": 4000,
"mode": "chat",
"output_cost_per_token": 0.00001,
"supports_function_calling": true,
"supports_tool_choice": true
}