Grok-2 Mini — Free AI Model & API

grok-(xai)/grok-2-mini
chat
Context Window 131K
Max Output 0
Rate Limit $25/month free credits, resets monthly
Cost $0.00 FREE
Free Period Since May 20, 2026
Credit Card Required
Status Online

Overview

Model ID
grok-2-mini
Base URL
https://api.x.ai/v1
Specifications
Context: 131K · Output: 0 · Modality: text · OpenAI Compat: Yes

Quick Start

Integrate Grok-2 Mini with 3 lines of code. See the config generator for Claude Code, Cursor, and more.

from openai import OpenAI

client = OpenAI(
 base_url="https://api.x.ai/v1",
 api_key="YOUR_API_KEY"
)

response = client.chat.completions.create(
 model="grok-2-mini",
 messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
import OpenAI from "openai";

const openai = new OpenAI({
 baseURL: "https://api.x.ai/v1",
 apiKey: "YOUR_API_KEY",
});

const completion = await openai.chat.completions.create({
 model: "grok-2-mini",
 messages: [{ role: "user", content: "Hello!" }],
});

console.log(completion.choices[0].message.content);
curl https://api.x.ai/v1/chat/completions \
 -H "Content-Type: application/json" \
 -H "Authorization: Bearer YOUR_API_KEY" \
 -d '{
 "model": "grok-2-mini",
 "messages": [{"role": "user", "content": "Hello!"}]
 }'

Other Free Models from Grok (xAI)

Rate Limits & Constraints

Rate Limit $25/month free credits, resets monthly
Context Window 131K
Max Output Tokens 0
Cost Free — since May 20, 2026
Credit Card Required
OpenAI Compatible Yes — drop-in replacement

Grok (xAI) Platform Limitations

  • 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)

Features & Use Cases

Best For

Chat

Modality Support

text

Grok (xAI) Highlights

  • $25/month free credits
  • Grok-2: chat + reasoning
  • Grok-2 Mini: fast, lightweight
  • OpenAI-compatible endpoint

Playground — Test Grok-2 Mini

Test Grok-2 Mini directly in your browser. Your API key is sent directly to Grok (xAI) — never stored.

Model: Grok-2 Mini Get Key

🔒 Your key is never stored — sent directly to the model provider via our server proxy.

Ready to chat with Grok-2 Mini.

Frequently Asked Questions

How do I get an API key for Grok-2 Mini?

Sign up at Grok (xAI) to get your API key. A credit card may be required for verification. Once you have the key, use the code snippets in the Quick Start section above.

Is Grok-2 Mini really free?

Yes. Grok-2 Mini is available on Grok (xAI)'s free tier and has been free since May 20, 2026. Rate limits apply: $25/month free credits, resets monthly. Always check the provider's terms for any changes to the free tier.

What are Grok-2 Mini's rate limits?

$25/month free credits, resets monthly Context window: 131K. Max output: 0. Credit card may be required.

What are the best free alternatives to Grok-2 Mini?

Popular free alternatives include inclusionAI: Ring-2.6-1T, Baidu Qianfan: CoBuddy (free), Owl Alpha. You can also browse all 147+ free models on our site.

More questions? See our full FAQ →

Similar Free Models