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 →
Overview
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)
Quick Start Guide
- 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
All Free Grok (xAI) Models — Context Windows & Rate Limits
| Model | Context | Max Output | Modality | Rate Limit | Released | Status | |
|---|---|---|---|---|---|---|---|
| Grok-2 | 131K | 0 | $25/month free credits, resets monthly | — | Online | Details | |
| Grok-2 Mini | 131K | 0 | $25/month free credits, resets monthly | — | Online | Details |
Pricing & Limits
Credit Card Required
Free Tier $25/mo credits
Context Range 131K
Total Models 2 free
Rate Limits $25/month free credits, resets monthly
API Compatibility OpenAI SDK-compatible (Chat Completions)
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)