How to Get a Free Grok (xAI) API Key (2026)
2 free models available — credit card may be required. Get your Grok (xAI) API key → Test free models →
Grok (xAI) FreeLLM Score
All Free Grok (xAI) Models — Context Windows & Rate Limits
| Model | Context | Max Output | Modality | Rate Limit | Released | Status |
|---|---|---|---|---|---|---|
| Grok-2 Mini | 131K | 0 | $25/month free credits, resets monthly | — | Online | |
| Grok-2 | 131K | 0 | $25/month free credits, resets monthly | Dec 12, 2024 | Online |
What is Grok (xAI)?
Grok-2 and Grok-2 Mini from xAI — $25/month free credits.
xAI (Elon Musk's AI company) offers the Grok-2 and Grok-2 Mini models through a free API tier with $25/month in free credits that reset monthly. Requires a credit card to sign up. The API is fully OpenAI-compatible, making it a drop-in replacement for any OpenAI-compatible client.
- $25/month free credits
- Grok-2: chat + reasoning
- Grok-2 Mini: fast, lightweight
- OpenAI-compatible endpoint
API Compatibility: OpenAI SDK-compatible (Chat Completions)
How to Get a Grok (xAI) API Key
- 1 Sign up at console.x.ai Credit card required. $25/month free credits, resets monthly.
- 2 Go to API Keys
- 3 Generate an API key
- 4 Choose a model Grok-2 for chat + reasoning. Grok-2 Mini for lighter tasks.
- 5 Configure OpenAI client Base URL: https://api.x.ai/v1
Grok (xAI) Free Tier Limits & Pricing
Grok (xAI) API Setup Tutorial & Tools
Grok (xAI) is fully compatible with popular AI coding assistants like Cursor, Claude Code, and more. To see step-by-step API configuration instructions for your favorite tool, please visit our Global Configuration Guide →
Use Cases
What Grok (xAI)'s free models are best for, based on aggregated model capabilities:
Limitations & Caveats
- Credit card required — not truly free without payment method
- $25/month free credits reset monthly — unused credits do not roll over
- Limited model selection (Grok-2 and Grok-2 Mini only)
Frequently Asked Questions
Is xAI's $25/month free credit really free?
Technically it's a promotional credit, not a free tier. You must provide a credit card to sign up, and the $25 resets monthly. If you don't use it, you lose it — no rollover.
How does Grok-2 compare to GPT-4o or Gemini 2.5?
Grok-2 is competitive for chat and reasoning tasks, though benchmarks generally place it slightly below GPT-4o and Gemini 2.5 Pro. Grok-2 Mini is faster and lighter, suitable for simple tasks.
Can I use xAI API with Claude Code?
xAI's API is OpenAI-compatible, but Claude Code specifically requires an Anthropic-compatible endpoint. You'd need to use xAI with tools that support custom OpenAI endpoints (Cursor, Codex, OpenCode).