xAI

Free Grok API

xAI’s model with real-time knowledge — free API credits available.

Grok is xAI’s model family with real-time awareness. xAI offers signup credit and recurring free API credits (with data-sharing opt-in), making Grok 4 Fast and Grok 3 Mini accessible without a bill.

1
Free providers
xAI (Grok)
Recommended
GrokxAIGeneral

Quickstart — Grok on xAI (Grok)

Python
from openai import OpenAI

client = OpenAI(
    base_url="https://api.x.ai/v1",
    api_key="YOUR_FREE_KEY"   # from xAI (Grok)
)

resp = client.chat.completions.create(
    model="grok-3-mini",   # Grok on xAI (Grok)
    messages=[{"role": "user", "content": "Hello!"}]
)
print(resp.choices[0].message.content)

Providers offering Grok free

Create your own key on any of these. Click through for setup, limits and code.

Free Grok API — FAQ

Is Grok free to use via API?+

Yes. 1 providers in our directory host Grok with free access, starting with xAI (Grok). You create your own free key on the provider’s site.

Which provider is best for a free Grok API key?+

xAI (Grok) — Grok models with recurring free API credits. See the full comparison below to match limits and speed to your needs.

How do I call Grok with the OpenAI SDK?+

Set your base URL to your chosen provider’s endpoint (shown on each provider page), use your free key, and pass a Grok model id such as "grok-3-mini".