Use the OpenAI SDK against free providers — Groq, Gemini, Mistral, Cohere, OpenRouter, and 25+ more. No OpenAI bill, no credit card.
🌐 Browse all OpenAI-compatible free APIs at freellms.org
Any API that accepts the OpenAI Chat Completions request format (/v1/chat/completions, messages, model, apiKey). You can swap https://api.openai.com/v1 for any provider below and your code keeps working — for free.
Full directory of OpenAI-compatible providers: freellms.org
| Provider | Base URL | Free Tier | OpenAI-Compatible |
|---|---|---|---|
| Groq | https://api.groq.com/openai/v1 |
30 RPM, 14,400 RPD | ✅ Full |
| Google Gemini | https://generativelanguage.googleapis.com/v1beta |
15 RPM, 1,500 RPD | ✅ Full |
| Mistral AI | https://api.mistral.ai/v1 |
Free tier | ✅ Full |
| Cohere | https://api.cohere.com/v2 |
20 RPM | ✅ Full |
| OpenRouter | https://openrouter.ai/api/v1 |
1K RPD | ✅ Full |
| NVIDIA NIM | https://integrate.api.nvidia.com/v1 |
Free tier | ✅ Full |
| GitHub Models | https://models.github.ai/inference |
Free tier | ✅ Full |
| Cloudflare Workers AI | https://api.cloudflare.com/client/v4/accounts/{id}/ai/run |
10K neurons/day | ✅ Full |
| Cerebras | https://api.cerebras.ai/v1 |
5 RPM | ✅ Full |
| Hugging Face | https://router.huggingface.co/v1 |
Free tier | ✅ Full |
| SambaNova | https://api.sambanova.ai/v1 |
20 RPM | ✅ Full |
| LLM7.io | https://api.llm7.io/v1 |
30 RPM | ✅ Full |
| Z AI (Zhipu) | https://open.bigmodel.cn/api/paas/v4 |
Free tier | ✅ Full |
| DeepSeek | https://api.deepseek.com/v1 |
Free tier | ✅ Full |
All base URLs + free API keys: freellms.org
from openai import OpenAI
# Before: paid OpenAI
# client = OpenAI(api_key="sk-...")
# After: free Groq (no credit card)
client = OpenAI(
base_url="https://api.groq.com/openai/v1", # free OpenAI-compatible API
api_key="YOUR_FREE_KEY", # get at freellms.org
)
response = client.chat.completions.create(
model="llama-3.3-70b-versatile", # free model
messages=[{"role": "user", "content": "Hello, free ChatGPT!"}],
)
print(response.choices[0].message.content)export OPENAI_BASE_URL="https://api.groq.com/openai/v1"
export OPENAI_API_KEY="your-free-key" # freellms.org
codex --model "llama-3.3-70b-versatile"Settings → Models → Add Model
Model name: llama-3.3-70b-versatile
Base URL: https://api.groq.com/openai/v1
API key: your-free-key # freellms.org
export ANTHROPIC_BASE_URL="https://openrouter.ai/api"
export ANTHROPIC_AUTH_TOKEN="sk-or-v1-your-key" # openrouter.ai/keys
export ANTHROPIC_API_KEY=""Step-by-step config for every tool: freellms.org
- Drop-in replacement — same SDK, same request format, zero code changes
- No OpenAI bill — permanently free tiers, not trial credits
- No credit card — most providers issue keys on email signup
- Multi-provider — switch Groq → Gemini → Mistral by changing one URL
- Works everywhere — Cursor, Codex, Claude Code, Aider, Cline, Open WebUI
Browse all OpenAI-compatible providers, get free keys, and copy config snippets at freellms.org.
- Free LLM API keys
- Free AI proxy gateway
- Free LLM models
- Awesome free AI agents
- Awesome free LLM APIs
MIT — provider data sourced from freellms.org, updated daily.