Provider

Free OpenAI-compatible API base URLs

Most free LLM providers accept the OpenAI API format. You change two values in your client: the base URL and the API key. This page lists the base URL of each free provider, checked on the provider's own documentation.

Base URLs of free providers

Checked on provider documentation
ProviderOpenAI-compatible base URLKey
Google AI Studio (Gemini)https://generativelanguage.googleapis.com/v1beta/openai/Gemini API key
Groqhttps://api.groq.com/openai/v1Groq API key
OpenRouterhttps://openrouter.ai/api/v1OpenRouter key. Use model ids that end in :free.
NVIDIA API Cataloghttps://integrate.api.nvidia.com/v1NVIDIA API key
Cloudflare Workers AIhttps://api.cloudflare.com/client/v4/accounts/<account-id>/ai/v1Cloudflare API token
Coherehttps://api.cohere.ai/compatibility/v1Cohere trial or production key
Z.ai (Zhipu)https://api.z.ai/api/paas/v4/Z.ai API key
OVHcloud AI Endpointshttps://oai.endpoints.kepler.ai.cloud.ovh.net/v1Optional. Anonymous use is allowed at a low limit.
Kilo Gatewayhttps://ai-gateway.kilo.ai/api/v1Optional for free models
AI Hordehttps://oai.aihorde.net/v1Horde key, or the anonymous key 0000000000
Mistralhttps://api.mistral.ai/v1Mistral key. The API needs billing activation.
Scaleway Generative APIshttps://api.scaleway.ai/v1Scaleway secret key
Note: some SDKs add /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[].name or n other than 1 return error 400. A temperature of 0 changes to 1e-8.
  • Cloudflare: the URL contains your account id. The token is sent as a Bearer token.
  • AI Horde: the endpoint supports /v1/chat/completions and /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/models on 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.

Free models with tool calling and 128K+ context
ModelFree onContextFree limits (best offer)ToolsVision
GLM 5.3 FlashNVIDIA NIM1M40 req/min
40 RPM
YesNo
Gemini 3.8 FlashGoogle AI Studio1MRecurring provider quotaYesYes
Gemini 3.7 FlashGoogle AI Studio1M10 req/min
20 req/day
250,000 tokens/min
~3M
YesYes
Dots3 Note PreviewKilo Gateway, OpenRouter512K20 req/min
50 req/day
50 req/day account-wide (1,000 after a $10 purchase)
YesYes
Qwen3.8 27BGroq, OVH AI Endpoints262K30 req/min
250 req/day
70,000 tokens/min
~6M
YesYes
Gemini 3.6 FlashGoogle AI Studio1M10 req/min
20 req/day
250,000 tokens/min
~3M
YesYes
Qwen 3.8 27BCloudflare Workers AI262KShared 10k neurons/dayYesYes
Gemini 3.5 FlashGoogle AI Studio1M10 req/min
20 req/day
250,000 tokens/min
~3M
YesYes
Nemotron 3 Ultra 550BKilo Gateway, NVIDIA NIM, OpenRouter1M20 req/min
50 req/day
50 req/day account-wide (1,000 after a $10 purchase)
YesNo
Gemini 3.5 Flash LiteGoogle AI Studio1M15 req/min
20 req/day
250,000 tokens/min
~3M
YesYes
Qwen3.6 27BOVH AI Endpoints131K2 req/min
2/min per IP
YesNo
Muse Glimmer 30BNVIDIA NIM131K40 req/min
40 RPM
YesYes

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 auto to let the router choose. Use auto:fast or auto:smart to prefer speed or intelligence. You can also send a model id.
  • The X-Routed-Via response header shows the provider and the model that answered.
  • The same server also has /v1/messages for Anthropic clients and /v1beta for 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

ProblemCauseFix
404 Not FoundThe base URL has a wrong path, or it contains /chat/completionsUse the base URL from the table exactly
401 UnauthorizedThe key is for a different providerUse the key from the same provider as the base URL
400 on a valid requestThe provider does not support one parameterRemove parameters such as logprobs or n
Model not foundThe model id is from a different providerCall GET /v1/models on the base URL
429 Too Many RequestsThe free limit is reachedWait for the reset, or use a gateway that fails over
Use every one of these through one key. FreeLLMAPI is an open-source, self-hosted router that puts all these free tiers behind a single OpenAI-compatible endpoint and fails over when one is rate-limited. Browse the catalog or go live.

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.

Sources

All guides · Browse all free models

Keep reading

All posts →
Provider

Free Gemini API

Google AI Studio's permanent free tier — Gemini and Gemma, no credit card.

Provider

Free DeepSeek API

DeepSeek V3, R1 and V4 served free across multiple providers.

Provider

Free Llama API

Meta's Llama models free across 14 providers, behind one key.