Free AI APIs: 31 providers, one pattern
You don't have to pay for model access to write code or build your own tool; thirty-one providers offer a permanently free tier. But "free" means three different things here, and the most-wanted use case (Claude Code) actually costs money. Below: the underlying pattern, five providers worth starting with, and where each one will trip you up.
The list itself
All thirty-one providers, with their URLs and current limits, live in the repo below, updated daily. If the list is all you came for, go ahead; you don't need to read the rest.
What follows is the part the list doesn't tell you: which one to actually start with, where "free" stops being free, and which URL will send you into a wall on your first try.
The pattern: learn it once, use it everywhere
Most of these providers speak the same format as OpenAI. In practice: whatever tool you use (Cursor, Codex, Aider, your own script), you're always asked the same three things: URL, key, model name. Once that clicks, all thirty-one providers become the same door with a different address.
Three steps
- 1
Pick a provider
New to this? Groq. No credit card, fast, and a comfortable limit.
- 2
Get the key
Most only want an email. Takes under a minute.
- 3
Paste it into your tool
URL + key + model name. Whatever the tool, it's these three.
In Python that's three lines. The code below connects to Groq; change the base_url line and the same code works with any provider.
from openai import OpenAI
client = OpenAI(
base_url="https://api.groq.com/openai/v1",
api_key="GROQ_API_KEY",
)
response = client.chat.completions.create(
model="llama-3.3-70b-versatile",
messages=[{"role": "user", "content": "Merhaba!"}],
)
print(response.choices[0].message.content)What "free" means here
Three different things, and mixing them up leads to disappointment: some are genuinely free forever (Groq, Gemini, Cerebras), some want identity verification (NVIDIA wants a phone number), and some keep the free tier narrow and gate real usage behind payment (OpenRouter).
The real limit isn't model quality, it's requests per minute. Plenty for chatting; but write a script that calls the model in a loop and you'll hit the wall within the first minute.
What it asks, what it gives
- Provider
- Groq
- What it asks
- Email only
- Free limit
- 30 req/min
- Provider
- Google Gemini
- What it asks
- Email only
- Free limit
- 15 req/min · 1,500/day
- Provider
- Cerebras
- What it asks
- Email only
- Free limit
- 5 req/min
- Provider
- NVIDIA NIM
- What it asks
- Phone verification
- Free limit
- Up to 40 req/min
- Provider
- OpenRouter
- What it asks
- Registration
- Free limit
- Narrow free tier
| Provider | What it asks | Free limit |
|---|---|---|
| Groq | Email only | 30 req/min |
| Google Gemini | Email only | 15 req/min · 1,500/day |
| Cerebras | Email only | 5 req/min |
| NVIDIA NIM | Phone verification | Up to 40 req/min |
| OpenRouter | Registration | Narrow free tier |
Don't trust the list blindly
The source list is generated automatically and refreshed daily, and that's the good part. The bad part: a few rows are broken. xAI is listed twice, and Cline's URL field is empty. Model names also change often. URLs are stable, model lists aren't; always take the model name from the provider's own dashboard.
Tools used
Groq: start here
Noticeably faster responses than the rest, and no credit card, just an email. 30 requests a minute, plenty for chat and normal development. Make your first attempt here; once the pattern clicks, the others are just a different URL.
https://api.groq.com/openai/v1Take the model name from the console; Groq's free model list changes from time to time, don't rely on a fixed name.
Google Gemini: 1M token context
Gives you a 1M-token context window on the free tier, the most generous option here for feeding it long documents or a codebase. No credit card. The 1,500-requests-a-day cap is invisible for most personal use.
https://generativelanguage.googleapis.com/v1beta/openai/Careful: the source list ends this URL at /v1beta; that's Gemini's own format and it won't work with the OpenAI SDK. Google's own docs say to append /openai/. The URL above is the correct one.
NVIDIA NIM: the widest model pool
The provider with the most models here, and it goes beyond text: image, audio and video models too. If you want to try many different models with one key, this is the place.
https://integrate.api.nvidia.com/v1No credit card, but it does want phone verification; if you came for "no card" and don't want to hand over your number, this is where you stop. It has the most models among the card-free options; the price is your number.
Cerebras: for speed
Runs on its own hardware, so token generation is very fast. No credit card. You feel the difference on anything that needs an instant answer.
https://api.cerebras.ai/v1The cap is tight: 5 requests a minute. Fine for chatting, but a script making back-to-back calls will jam immediately. Speed yes, volume no.
OpenRouter: one key, many models
One key gets you models from dozens of providers; you call the free ones by appending :free to the model name. Saves you from signing up with each provider separately.
https://openrouter.ai/api/v1The most-asked use case costs money here: running Claude Code against Anthropic models through OpenRouter requires a one-time $10 top-up. The free tier exists, but the Claude Code path isn't free; filing it under "free" is misleading.
DOA: Yapay Zeka ve Otomasyon
Installing these tools on your own is one thing; actually building with them is another. The community has people using these daily and people building systems from scratch.
If you want a system that actually runs in your business, let's talk for 10 minutes; I'll look at what you're trying to build and tell you which path fits. Free, and not a sales pitch.
Book a 10-minute callIf you'd rather learn this alongside people doing the same work instead of on your own, the community is always open:
Join the communityThis is an affiliate link.