Grok 2
DeprecatedPrevious generation Grok model, superseded by Grok 3.
Overview
Grok 2 was xAI's flagship model before the release of Grok 3. It supported multimodal inputs and real-time web search.
History
Grok 2 was released on 2024-08-13. This model is marked as deprecated and may be retired in the future.
Training & availability
xAI has not released the underlying model weights — access is via their hosted API only.
Capabilities
-
Context window: 131K tokens.
-
Max output: 8K tokens.
-
Input modalities: text, image.
Recommended for: vision, agentic.
Pricing
- Input: $2.0000 per 1M tokens
- Output: $10.0000 per 1M tokens
Use the cost calculator above to estimate monthly spend for your workload.
Quick start
Minimal example using the OpenRouter API. Copy, paste, replace the key.
from openai import OpenAI
client = OpenAI(
base_url="https://openrouter.ai/api/v1",
api_key="sk-or-...",
)
resp = client.chat.completions.create(
model="xai/grok-2",
messages=[{"role": "user", "content": "Explain quantum computing in one sentence."}],
)
print(resp.choices[0].message.content)Cost calculator
Estimate your monthly bill. Presets are typical workload sizes.
Integrations & tooling support
- Tool calling
- Supported
- Structured outputs
- Not supported
Price vs quality
Standard pricing band. Quality tier pending more benchmark coverage.
- Quality percentile
- —
- Effective price
- $8/1M
- Pricing breakdown
- $2/1M in
$10/1M out
Community ratings
Rate Grok 2
Sign in to rate and review.
Comments
Sign in to leave a comment.