impulse

Grok 2

Frontier lab
API id grok-2
Input / 1M
$2.00
at Vercel AI Gateway
Output / 1M
$10.00
at Vercel AI Gateway
Context window
131K
tokens
Max output
4K
tokens per reply
Hosts
1
1 listings
Released
-
date not published

Pricing

List prices at Vercel AI Gateway, in US dollars per million tokens.

TierInput / 1MOutput / 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
Use your own numbers

Where to run it

1 host serve Grok 2. The comparison is on blended price, 3 parts input to 1 part output.

HostIn / out per 1M
grok-2
$2.00 / $10.00

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

  • Grok 4.7
    xAI · on xAI
    $2.00 / $6.00
    Has every key capability
    25% less
  • Grok Build 0.1
    xAI · on xAI
    $1.00 / $2.00
    Has every key capability
    69% less
  • Grok Build
    xAI · on xAI
    $2.00 / $6.00
    Has every key capability
    25% less

Other frontier labs

  • Gemini 4 Hydrogen
    Google · on Google AI Studio
    $1.50 / $7.50
    Has every key capability
    25% less
  • GPT-6.1 Terra
    OpenAI · on OpenAI
    $1.00 / $5.00
    Has every key capability
    50% less
  • Claude Haiku 5.5
    Anthropic · on Anthropic
    $0.10 / $0.50
    Has every key capability
    95% less
  • GPT-5.4 Mini
    OpenAI · on OpenAI
    $0.75 / $4.50
    Has every key capability
    58% less

Open-weight picks

  • Kimi K3.1 Pro
    Moonshot AI · on Databricks
    $2.00 / $10.00
    Has every key capability
    0% less
  • Qwen3.8.2 4T A95B
    Alibaba Qwen · on DeepInfra
    $2.00 / $6.00
    Has every key capability
    25% less
  • Muse Spark Open
    Meta · on Baseten
    $1.25 / $4.25
    Has every key capability
    50% less
  • Inkling
    Independent · on DeepInfra
    $0.95 / $4.05
    Has every key capability
    57% less

Model line

Newer and older versions, at each lab's own price.

  1. Sep 2026Grok 4.7Latest$2.00 / $6.00
  2. Sep 2026Grok4.7$2.00 / $6.00
  3. Aug 2026Grok 4.6$2.00 / $6.00
  4. Aug 2026Grok4.6$2.00 / $6.00
  5. Jul 2026Grok 4.5$2.00 / $6.00
  6. Apr 2026Grok 4.3$1.25 / $2.50
  7. Mar 2026Grok 4.20$1.25 / $2.50
  8. UndatedGrok 4$3.00 / $15.00

Call it

Using Vercel AI Gateway's API.

Python
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
}