Base URLs of free providers
| Provider | OpenAI-compatible base URL | Key |
|---|---|---|
| Google AI Studio (Gemini) | https://generativelanguage.googleapis.com/v1beta/openai/ | Gemini API key |
| Groq | https://api.groq.com/openai/v1 | Groq API key |
| OpenRouter | https://openrouter.ai/api/v1 | OpenRouter key. Use model ids that end in :free. |
| NVIDIA API Catalog | https://integrate.api.nvidia.com/v1 | NVIDIA API key |
| Cloudflare Workers AI | https://api.cloudflare.com/client/v4/accounts/<account-id>/ai/v1 | Cloudflare API token |
| Cohere | https://api.cohere.ai/compatibility/v1 | Cohere trial or production key |
| Z.ai (Zhipu) | https://api.z.ai/api/paas/v4/ | Z.ai API key |
| OVHcloud AI Endpoints | https://oai.endpoints.kepler.ai.cloud.ovh.net/v1 | Optional. Anonymous use is allowed at a low limit. |
| Kilo Gateway | https://ai-gateway.kilo.ai/api/v1 | Optional for free models |
| AI Horde | https://oai.aihorde.net/v1 | Horde key, or the anonymous key 0000000000 |
| Mistral | https://api.mistral.ai/v1 | Mistral key. The API needs billing activation. |
| Scaleway Generative APIs | https://api.scaleway.ai/v1 | Scaleway secret key |
/chat/completions to the base URL. Do not put /chat/completions in the base URL yourself. Keep the trailing path exactly as shown.How to change the base URL in your client
The OpenAI SDKs read the base URL from a parameter or from an environment variable. This example uses Groq. Change the URL, the key and the model id for a different provider.
Python (OpenAI SDK)
from openai import OpenAI
client = OpenAI(
base_url="https://api.groq.com/openai/v1",
api_key="<groq-key>",
)
resp = client.chat.completions.create(
model="openai/gpt-oss-20b",
messages=[{"role": "user", "content": "Say hello"}],
)
print(resp.choices[0].message.content)Environment variables
export OPENAI_BASE_URL=https://api.groq.com/openai/v1
export OPENAI_API_KEY=<groq-key>Many tools, for example Open WebUI, Cline and Aider, have a field for an OpenAI-compatible base URL. Put the URL from the table in that field.
Test a base URL before you use it
Do two checks before you configure a tool. First, list the models. This check shows that the URL and the key are correct. Second, send one short chat request. This check shows that the model id is valid and that you have quota.
Check the URL, the key and one model
BASE=https://api.groq.com/openai/v1
KEY=<groq-key>
# 1. List the models
curl -s $BASE/models -H "Authorization: Bearer $KEY" | head -c 600
# 2. Send one short request
curl -s $BASE/chat/completions \
-H "Authorization: Bearer $KEY" \
-H "Content-Type: application/json" \
-d '{"model": "openai/gpt-oss-20b", "messages": [{"role": "user", "content": "ping"}], "max_tokens": 200}'Do not set a very small max_tokens value on reasoning models. Some free models use hidden reasoning tokens before the visible answer. With a small cap, the response can stop with an empty answer.
If the first check returns 401, the key is wrong for this URL. If the second check returns 429, the URL and key are correct, but the free limit is reached. Read the provider's rate limit headers to find the reset time.
Compatibility gaps to know
"OpenAI-compatible" does not mean that every parameter works. Each provider supports a different subset.
- Groq: requests with
logprobs,logit_bias,top_logprobs,messages[].nameornother than 1 return error 400. Atemperatureof 0 changes to1e-8. - Cloudflare: the URL contains your account id. The token is sent as a Bearer token.
- AI Horde: the endpoint supports
/v1/chat/completionsand/v1/models. Volunteers run the models, so the speed and the model list change. - Model ids: each provider uses its own model names. Read
GET /v1/modelson each base URL to get valid ids.
Free models you can call today
These free models support tool calling and have a context window of at least 128K tokens. The table shows the providers that serve each model free.
| Model | Free on | Context | Free limits (best offer) | Tools | Vision |
|---|---|---|---|---|---|
| GLM 5.3 Flash | NVIDIA NIM | 1M | 40 req/min 40 RPM | Yes | No |
| Gemini 3.8 Flash | Google AI Studio | 1M | Recurring provider quota | Yes | Yes |
| Gemini 3.7 Flash | Google AI Studio | 1M | 10 req/min 20 req/day 250,000 tokens/min ~3M | Yes | Yes |
| Dots3 Note Preview | Kilo Gateway, OpenRouter | 512K | 20 req/min 50 req/day 50 req/day account-wide (1,000 after a $10 purchase) | Yes | Yes |
| Qwen3.8 27B | Groq, OVH AI Endpoints | 262K | 30 req/min 250 req/day 70,000 tokens/min ~6M | Yes | Yes |
| Gemini 3.6 Flash | Google AI Studio | 1M | 10 req/min 20 req/day 250,000 tokens/min ~3M | Yes | Yes |
| Qwen 3.8 27B | Cloudflare Workers AI | 262K | Shared 10k neurons/day | Yes | Yes |
| Gemini 3.5 Flash | Google AI Studio | 1M | 10 req/min 20 req/day 250,000 tokens/min ~3M | Yes | Yes |
| Nemotron 3 Ultra 550B | Kilo Gateway, NVIDIA NIM, OpenRouter | 1M | 20 req/min 50 req/day 50 req/day account-wide (1,000 after a $10 purchase) | Yes | No |
| Gemini 3.5 Flash Lite | Google AI Studio | 1M | 15 req/min 20 req/day 250,000 tokens/min ~3M | Yes | Yes |
| Qwen3.6 27B | OVH AI Endpoints | 131K | 2 req/min 2/min per IP | Yes | No |
| Muse Glimmer 30B | NVIDIA NIM | 131K | 40 req/min 40 RPM | Yes | Yes |
Showing 12 of 46 matching free models. See all models.
Live data from the FreeLLMAPI catalog (version 2026.11.19, checked 19 November 2026). Free limits change often. The catalog is checked every day.
One base URL for every free provider
Each base URL in the table has its own key and its own rate limit. When one provider sends a 429 error, your code must change to another URL. FreeLLMAPI gives you one OpenAI-compatible base URL instead. It runs on your computer and sends each request to a free provider that still has quota.
Install and call the local base URL
curl -fsSL https://freellmapi.co/install.sh | bash
export OPENAI_BASE_URL=http://localhost:3001/v1
export OPENAI_API_KEY=<unified-key>
curl $OPENAI_BASE_URL/chat/completions \
-H "Authorization: Bearer $OPENAI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "auto", "messages": [{"role": "user", "content": "hi"}]}'- Add your provider keys on the Keys page at
http://localhost:3001. - Use
autoto let the router choose. Useauto:fastorauto:smartto prefer speed or intelligence. You can also send a model id. - The
X-Routed-Viaresponse header shows the provider and the model that answered. - The same server also has
/v1/messagesfor Anthropic clients and/v1betafor Gemini CLI.
FreeLLMAPI uses free tiers, so the rate limits of each provider still apply. Failover spreads the load across providers, but it does not remove the limits.
Troubleshooting
| Problem | Cause | Fix |
|---|---|---|
| 404 Not Found | The base URL has a wrong path, or it contains /chat/completions | Use the base URL from the table exactly |
| 401 Unauthorized | The key is for a different provider | Use the key from the same provider as the base URL |
| 400 on a valid request | The provider does not support one parameter | Remove parameters such as logprobs or n |
| Model not found | The model id is from a different provider | Call GET /v1/models on the base URL |
| 429 Too Many Requests | The free limit is reached | Wait for the reset, or use a gateway that fails over |
Frequently asked questions
What is the OpenAI-compatible base URL for Gemini?
Google documents https://generativelanguage.googleapis.com/v1beta/openai/ as the base URL. Use your Gemini API key from AI Studio as the API key.
What is the Groq OpenAI base URL?
Groq documents https://api.groq.com/openai/v1. Use a Groq API key and a Groq model id.
Is there a free OpenAI-compatible API without a key?
Yes, with low limits. OVHcloud AI Endpoints allows 2 anonymous requests per minute for each IP and model. Kilo Gateway allows 200 anonymous requests per hour to free models.
Can I use the OpenAI Python SDK with free providers?
Yes. Set base_url to the provider URL and api_key to the provider key. Use a model id from that provider.
How do I use many free providers with one base URL?
Run a gateway such as FreeLLMAPI on your computer. Point your client at http://localhost:3001/v1 with one unified key, and the router picks a provider for each request.
Related guides
- Free LLM API with no credit card
- LLM API without signup
- Free LLM API rate limits
- Free LLM API in Python
- free llm api
- openrouter free alternative
Sources
- Google AI Studio: OpenAI compatibility (checked 20 November 2026)
- GroqCloud: OpenAI compatibility (checked 20 November 2026)
- OpenRouter: API rate limits (checked 20 November 2026)
- NVIDIA API Catalog: API reference (checked 20 November 2026)
- Cloudflare Workers AI: OpenAI compatible endpoints (checked 20 November 2026)
- Cohere: Compatibility API (checked 20 November 2026)
- Z.ai: OpenAI Python SDK (checked 20 November 2026)
- OVHcloud: AI Endpoints Responses API (checked 20 November 2026)
- Kilo Gateway: Authentication (checked 20 November 2026)
- AI Horde README (checked 20 November 2026)
- Mistral API reference (checked 20 November 2026)
- Scaleway Generative APIs: Rate limits (checked 20 November 2026)
- FreeLLMAPI docs: REST API (checked 20 November 2026)