xAI logo

Free xAI API Key, Base URL & Rate Limits

Model Provider

xAI (Elon Musk's AI company) offers newer Grok models — Grok-4.

Function Calling

How to get a free xAI API key

  1. 1
    Sign up at console.x.ai Same xAI account as Grok (xAI). If you already have an xAI key, it works here too.
  2. 2
    Go to API Keys in settings
  3. 3
    Generate or reuse an API key
  4. 4
    Choose a model Grok-4.3 for reasoning. Grok-4.1 Fast for 2M context. Grok-3 Mini for speed.
  5. 5
    Configure OpenAI client Base URL: https://api.x.ai/v1. Same endpoint as the Grok (xAI) provider.

Provider Snapshot

P Provider Type Model Provider
O OpenAI Compatible No
U Base URL https://api.x.ai/v1
F Free Tier Check provider
P Phone Required Yes
S Streaming Varies
T Function Calling Yes
V Vision Varies
L Last Updated 2026-06-15

Supported Models 3 models

View in directory →
Model ID Developer Context Availability Free Tier Use cases
grok-4-3
grok-4.3
xAI 1.0M Check provider Yes chat
grok-4-1-fast
grok-4.1-fast
xAI 2.0M Check provider Yes chat
grok-3-mini
grok-3-mini
xAI 131K Check provider Yes chat

Developer Tools

K Save API Key Never lose your API keys — save keys from all providers in one place. T Test API Key Test your API key and check quota.

xAI FreeLLM Score free API access score

How we score →
35 /100
🔹 Niche Provider — Consider for frontier model quality
Generosity Free limits and access terms
70
Access Signup and key availability
40
Model Breadth Free model coverage
0
Reliability Status and stability signals
20
Compatibility SDK and endpoint support
0
Quality Model capability signals
80

What is xAI?

xAI's Grok-4.3, Grok-4.1 Fast, Grok-3 Mini — 1M-2M context, OpenAI-compatible.

xAI (Elon Musk's AI company) offers newer Grok models — Grok-4.3, Grok-4.1 Fast, and Grok-3 Mini — through their API platform. Grok-4.1 Fast features an industry-leading 2M token context window. The API is OpenAI-compatible. Note: this is the same company as the Grok (xAI) provider on this site — xAI models appear under two provider slugs due to source data naming, but share the same API key and account.

  • Grok-4.3: latest Grok reasoning model
  • Grok-4.1 Fast: 2M context window
  • Grok-3 Mini: fast, lightweight
  • OpenAI-compatible endpoint

API Compatibility: OpenAI SDK-compatible (Chat Completions)

xAI Free Tier Limits & Pricing

Credit Card Required
Phone Verification Required
Free Tier $25/mo credits
Context Range 131K – 2.0M
Total Models 3 listed
Rate Limits Credit-based
API Compatibility OpenAI SDK-compatible (Chat Completions)

xAI API Setup Tutorials

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 →

xAI Model Use Cases

What xAI's free models are best for, based on aggregated model capabilities:

Chat 3 models

xAI Limitations & Caveats

  • Credit card required — same xAI account as Grok (xAI)
  • Rate limits are credit-based — harder to predict than RPM
  • Newer models may have less stable free tier availability

xAI FAQ

What's the difference between the Grok (xAI) and xAI providers on this site?

They're the same company — xAI. The two entries exist because data sources name them differently. Both use the same xAI API key and console. The grok-(xAI) entry has Grok-2 and Grok-2 Mini. The xai entry has newer models: Grok-4.3, Grok-4.1 Fast, and Grok-3 Mini.

Does Grok-4.1 Fast really support 2 million tokens of context?

Yes — 2M tokens is one of the largest context windows available anywhere, including paid tiers. This allows processing entire codebases or book-length documents in a single request. Rate limits apply based on your credit balance.

Should I use Grok-4.3 or Grok-4.1 Fast?

Grok-4.3 is the reasoning-focused model — better for complex analysis, math, and multi-step tasks. Grok-4.1 Fast trades some reasoning depth for speed and a massive 2M context window. For most developers, Grok-4.1 Fast is the better default.