Quick Answer: A free LLM gateway is a self-hosted proxy that exposes one OpenAI-compatible endpoint and routes each request to whichever free-tier provider still has quota. FreeLLM is an MIT-licensed example: you add your own provider keys, point your OpenAI client at localhost, and it handles failover on 429 and 5xx errors. Treat it as a prototyping tool, not production infrastructure.
Stacking free tiers sounds like a cheat code. Get a few million tokens from one provider, a few thousand requests from another, and suddenly you have serious capacity. The problem shows up in week one: every provider has its own SDK, auth scheme, rate limits, and failure modes. Your code fills with retry loops and quota spreadsheets. A free LLM gateway exists to absorb that mess, and FreeLLM, a self-hosted project on GitHub, is one of the more complete attempts.
What a free LLM gateway actually does
Your app talks to one local URL. Behind it, the router builds a list of candidate models from your fallback chain or routing strategy, skips anything unhealthy or already rate-limited, and sends the request to the first viable option.
Here's a concrete case. Your request goes to a Groq-backed model and gets a 429. The router puts that key on cooldown, which defaults to 60 seconds in the project's COOLDOWN_SECONDS setting, and retries the next candidate in your chain. Your application sees a normal response with an X-Routed-Via header telling you which provider answered.
Why does this matter? Because most rate-limit failures are transient. A key that's throttled at 14:02 is often fine by 14:03. A gateway that remembers that and routes around it saves you from writing that logic yourself.
Why stacking free tiers is harder than it looks
Here's the counter-intuitive part. More keys don't give you uniformly better answers. They give you a pool whose quality shifts with time of day.
Free tiers usually have daily caps. The best models exhaust their quota first, and the router falls back to smaller ones. The project's own FAQ notes that caps often reset at midnight UTC, which means a coding session at 9 p.m. Pacific can quietly get weaker answers than the same prompt at breakfast. If you didn't expect that, you'll blame the prompt when the real cause is the routing.
The second trap is quota accounting. FreeLLM tracks requests and tokens per minute and per day for every (provider, model, key) combination. That's the right granularity, because provider limits are per key and per model. But it only works if you've added keys honestly and let the gateway see all of your traffic. Bypass it by calling a provider directly, and your counters drift from reality.
Most guides tell you that key rotation solves rate limits. It helps, but only within a single provider's policy. Free tiers don't always permit multiple accounts for the same person, so read each provider's terms before you multiply keys.
Setting it up without wrecking your evening
The Docker path is the quickest. Clone the repo, copy the environment template, and generate an encryption key:
- Run
git clone https://github.com/jaredfreellm/FREELLM_INSTALL.gitandcdinto it. - Run
cp .env.example .env, then generate a key withopenssl rand -hex 32and paste it intoENCRYPTION_KEY. - Run
docker compose up -d, then open the dashboard athttp://localhost:3001. - On the Keys page, add the keys for providers you actually have accounts with. Copy the unified key from the page header.
- Point your OpenAI client at
http://localhost:3001/v1and sendmodel="auto".
Back up that ENCRYPTION_KEY the moment you generate it. The project is explicit that without it, stored provider keys can't be decrypted. Lose the key and you re-enter every provider credential by hand.
If you'd rather run from source, you need Node.js 20 or newer, then npm install, cp .env.example .env, and npm run dev.
Routing selectors: auto, fast, smart, and profiles
The model field does more than name a model. Choosing the right selector is the main tuning decision you'll make.
| Selector | How the router picks | Best for | Main trade-off |
|---|---|---|---|
auto | Your default strategy (balanced unless changed) | General use, low thinking | Behavior depends on current health scores |
auto:fast | Lowest-latency healthy model | Autocomplete, chat UIs | Often the smaller model, so less reasoning depth |
auto:smart | Most capable healthy model | Debugging, analysis | Burns the best model's quota faster |
auto:<profile> | Your named fallback chain | Coding or vision workflows | Only as good as the chain you built |
<model-id> | That exact model, with failover to equivalents | Reproducible output | Fails over if the pinned model is unavailable |
Here's where most setups go wrong: they use auto:smart for everything. That drains the strongest quota by mid-morning. Reserve it for the requests that need it and use auto:fast for the rest.
Security: skip the zip, clone the repo
This is the section the project's README doesn't want you to focus on, and it should. The first call to action on the page is a download link to a release zip, with its password printed right beside it.
Password-protected archives are a standard way to keep malicious binaries away from scanners. That doesn't prove this file is bad. But it's the wrong default for a tool that will hold your provider API keys and your unified access token. A gateway like this is a high-value target: one compromised binary could harvest every key you've loaded into it.
The safer route is the one the README also lists: clone the repository and build it yourself. Before you run anything, check that the repository's commit history looks real, that release artifacts match the source, and that the Docker image you build comes from the Dockerfile in the repo. Verify the project's maintainers and license (the README says MIT) before trusting it with credentials. We can't confirm from the source material alone who maintains this project, so treat that as an open question.
Here's where it gets interesting: the same caution applies to any self-hosted gateway. Keep the dashboard on localhost unless you put it behind TLS and a reverse proxy, and never commit .env or the SQLite database.
Where it breaks: limitations you'll hit
Free capacity has real ceilings, and the project lists them honestly:
- No frontier models. You get small and mid-size models. Plan your prompts around that.
- Variable latency. Shared capacity gets slow at peak hours, which tends to match your busiest work hours.
- No SLA. A provider can retire a model or change limits overnight.
- Inconsistent outputs. Failover means different requests can land on different models. If you need consistency, pin a model or use sticky sessions.
- Feature gaps. Not every provider supports tool calling, vision, or JSON mode. The router tries to match capabilities, but edge cases slip through.
Most people stop here and conclude the tool is useless. It isn't. It's useful for prototypes, evaluations, and personal scripts where a slow or different answer is an acceptable cost. It's a poor fit for anything customer-facing.
Frequently Asked Questions
What is a free LLM gateway?
A free LLM gateway is a proxy that gives you one API endpoint in front of several providers' free tiers. It routes each request to a provider that still has quota and fails over when one is rate-limited. FreeLLM is a self-hosted example: you supply your own provider keys, and it exposes an OpenAI-compatible /v1 endpoint on your machine.
How do I set up FreeLLM with an OpenAI client?
Run the Docker setup or npm run dev, add your provider keys in the dashboard, and copy the unified key. Then set your client's base URL to http://localhost:3001/v1 and use the unified key as the API key. Send model="auto" to let the router decide, or name a selector such as auto:fast.
Why does the quality of my free LLM answers change during the day?
Free tiers often have daily caps. As the strongest models use up their quota, the router falls back to smaller ones. Caps usually reset at a fixed time, often midnight UTC. Pin a specific model if you need consistent output across the day.
Is FreeLLM safe to use with private data?
Prompts go from your machine directly to the providers you enabled, and nowhere else. Each provider's data-handling policy still applies, and those policies differ, so check them before sending sensitive material. Avoid sending anything confidential through free tiers unless you've confirmed that provider's terms.
Start with one provider and one test prompt
Clone the repository, not the zip, and run it locally against a single provider you already have. Send the same prompt three times with auto:fast, then once with auto:smart, and compare the X-Routed-Via headers and answers. Pass this to anyone wrestling with unreliable free-tier rate limits, because a properly tuned free LLM gateway will save them hours of retry code.