FreeLLMAPI Setup: Free Claude Code & OpenCode on Windows
FreeLLMAPI is an open-source local proxy that puts the free tiers of many AI providers behind one API key. I install the Windows app, add Google AI Studio, NVIDIA NIM and OpenRouter keys, then connect OpenCode and Claude Code with the commands from its Agents page. You keep the tools, but free models answer, not Claude.
// contents
- 0:00 — What is FreeLLMAPI?
- 1:06 — Install FreeLLMAPI on Windows
- 2:00 — FreeLLMAPI dashboard tour
- 3:31 — Add provider API keys
- 3:51 — Google AI Studio API key
- 5:58 — NVIDIA NIM API key
- 8:52 — OpenRouter API key
- 11:11 — Routing strategy and playground test
- 11:39 — Connect OpenCode to FreeLLMAPI
- 14:11 — Fix the OpenCode config error
- 16:04 — Connect Claude Code to FreeLLMAPI

New here? A new build-along tutorial lands on the channel every week.
Subscribe on YouTubeThis FreeLLMAPI setup takes about fifteen minutes on Windows and ends with OpenCode and Claude Code both running on free models through one API key. I install the desktop app, add three provider keys, test them in the playground, then wire up both agents. OpenCode threw an error on the first try, and the fix is below.
Earlier in this series I ran Claude Code on NVIDIA NIM through a Python proxy. That was one provider and a repo to clone. This one is an installer and a dashboard.
What is FreeLLMAPI?
FreeLLMAPI is an open-source proxy that runs on your own machine and combines the free tiers of many AI providers behind one endpoint and one key. You add each provider's key once in its dashboard. Your coding agent only ever sees the single unified key.
The project README currently claims around 10.1 billion free tokens a month if you enable everything it supports. I did not test that. With only the three providers I add in this post, my dashboard showed 140.90 million per month remaining, plus 78 more models whose quotas the providers do not publish. I cannot burn through that in a month of normal coding, and I doubt you can either.
One thing to be clear about before you start: this keeps the Claude Code tool, not Anthropic's models. It is Ferrari ki body, Honda ka engine. Still fun to drive, and it costs nothing.
Install FreeLLMAPI on Windows
To install FreeLLMAPI on Windows, download the .exe installer from the project's GitHub releases page and run it like any normal program. There is no Docker and no Node setup on this path.
- Open the FreeLLMAPI releases page.
- Pick the latest release. When I recorded it was 0.16.30, updated three hours earlier, and a newer build was out the next day. This project ships fast, so take whatever is on top.
- Download the file for your system. Mac and Linux builds sit in the same list. I took the Windows
.exe. - Run the installer with the default options, then open FreeLLMAPI from the Start menu.
FreeLLMAPI dashboard tour
The app opens on a dashboard with a few pages, and you will use four of them.
Models lists every model you have available and its quota. This is also where you choose the routing order.
Playground is a chat window for testing. You can set the temperature and the maximum tokens per request.
Keys is where the provider keys go.
Agents has ready setup commands for coding tools. I use two of them here, OpenCode and Claude Code, but the list is much longer.
There is also an Analytics page with request counts and input and output tokens, and a Premium upgrade. I ignored Premium. Everything in this post works without it.
Add provider API keys
Go to Keys and click Add key. The app asks which provider the key belongs to, and the list is long.
Most of them are free. Some only give shared credits, and a few want a $1 or $5 transaction on your card first. I skipped those and started with the ones that need nothing but a login: Google AI Studio, NVIDIA NIM and OpenRouter.
Google AI Studio API key
A Google AI Studio API key is free and needs only a Google account. Create it in AI Studio, paste it into FreeLLMAPI, and the Gemini models appear in your list.
- In FreeLLMAPI, choose Google AI Studio as the provider.
- Open Google AI Studio in the browser and log in. The UI changed recently. The keys used to be right in front of you; now the link is Get API key at the bottom left.
- Click Create API key. Pick a project if you want it separate, or use the default one. Both work.
- Copy the key, go back to FreeLLMAPI, paste it and click Add key.
FreeLLMAPI then shows every free model that key can reach. I removed the old ones, the 2.5 models first, and kept the frontier model and a couple of the larger ones. Keep them all if you like. If you are not sure which ones are worth keeping, ask any chatbot to rank the list.
Next to the key there is a Check button. Click it. Green means the key is connected and tested.
I tried it in the playground with "Hi, which AI model are you right now?" The reply was "I am a large language model trained by Google", served by Gemini 3.1 Flash-Lite in 1323 milliseconds.
NVIDIA NIM API key
The NVIDIA NIM key is also free, but the account asks for phone number verification before it gives you one. That step trips people up, and I covered the account side in an earlier video that is linked in this video's description.
Once you are logged in to the NVIDIA dashboard:
- Click your profile at the top.
- Open API Keys.
- Generate a new key and copy it.
- In FreeLLMAPI, add a key with NVIDIA as the provider and paste it.
NVIDIA returns a big model list. I removed most of it and kept a few. The small models are not useful for coding, so there is no reason to let the router fall back to them.
While you are on this page, type no key in the provider search. Those providers need no API key at all. Kilo Gateway is one of them. You can enable them one by one for extra quota.
OpenRouter API key
OpenRouter gives you one key for a large set of models, including free ones. It is the provider I use most in OpenCode, and the free credits per day have been good to me.
- Go to
openrouter.aiand sign in with Google. - Open the dashboard, then Keys, then New key.
- Give it any name. I set the expiry to one day because the key was on screen in a video. Set a credit limit if you want one.
- OpenRouter sent a verification code to my Gmail. Enter it, and the key appears.
- Copy it and add it in FreeLLMAPI under OpenRouter.
Click Check all. In my run everything went green. If a model shows as not healthy, remove it so the router does not waste a request on it.
Back on the Models page, this is where the 140.90 million figure showed up, with nothing used yet.
Routing strategy and playground test
The routing strategy decides which model gets a request first. The options on screen were smartest first, fastest, most reliable, or a custom order you arrange yourself.
I picked smartest first. For coding I would rather wait a second longer for a better answer. If you mostly do quick edits, fastest makes more sense.
A second playground message, "how are you", came back fine with the new routing. At this point the proxy side is finished and the rest is about the agents.
Connect OpenCode to FreeLLMAPI
To connect OpenCode to FreeLLMAPI, copy the OpenCode command from the Agents page, run it in a terminal, and paste the unified API key when it asks. OpenCode then gets FreeLLMAPI as one more provider.
I already had OpenCode installed with OpenRouter. If you do not, the OpenCode with OpenRouter setup covers that part.
- Close OpenCode if it is open.
- In FreeLLMAPI, go to Agents and click OpenCode. Copy the command it shows.
- Open CMD and paste it:
npx freellmapi setup-opencode --url http://127.0.0.1:31415- It asks for the unified API key. Copy it from the FreeLLMAPI app and paste it in. The key starts with
freellmapi-.
What happens behind this is simple. The app runs a local server at http://127.0.0.1:31415. OpenCode stops sending requests to a provider's base URL and sends them to that local server instead. FreeLLMAPI sits in the middle, picks a model based on your routing strategy, forwards the request, and passes the answer back.
Fix the OpenCode config error
If OpenCode shows an error right after the setup command, the API key in its config file is wrong. Put the unified key into opencode.json by hand, save, and reopen OpenCode.
I knew this one was coming because I had hit it while testing before the recording. The file is here:
C:\Users\<your-username>\.config\opencode\opencode.jsonReplace <your-username> with your Windows user folder name.
- Open File Explorer and go to your user folder, then
.config, thenopencode. - Open
opencode.jsonin Notepad or VS Code. Explorer lists it as a JSON source file. - Find the API key value in the FreeLLMAPI entry and replace it with your unified key.
- Save, close, and start OpenCode again.
Now the model list has a FreeLLMAPI section next to OpenCode Zen and OpenRouter. This is my favourite part of the whole setup. All three sit in one session, so when a model runs out I switch to another one without restarting anything.
I selected Gemini 3.5 Flash from the FreeLLMAPI list and asked "how are you". It answered, and the reply was tagged with that model.
The FreeLLMAPI release notes mention a change to where the OpenCode setup stores the key, so newer builds may not hit this error at all. If yours does, the manual edit above still works.
Connect Claude Code to FreeLLMAPI
Claude Code connects the same way: copy the Claude Code command from the Agents page, run it, paste the unified key, then start claude. No manual file edit was needed here.
This is the command from the Agents page of the desktop app:
npx freellmapi setup-claude --url http://127.0.0.1:31415It asks for the unified key, the same one you gave OpenCode. Port 31415 is the desktop app. If you run FreeLLMAPI through Docker, the address is http://localhost:3001 instead. According to the project README the generator backs up your existing Claude Code config before it changes anything, and adding --dry-run shows the changes without writing them.
Then start it:
claudeTwo things tell you it worked. The header says API usage instead of your subscription, and when I asked which AI model it was, the model in use was auto, not a Claude model. Auto means the local server picks the model according to your routing strategy.
A warning from my own setup: I have a paid Claude plan on this machine, bought recently for a comparison video. After this command, Claude Code was on the free router and not on that plan. If you pay for Claude and want it back, restore the backup the generator made.
That is the full chain: one app, three free keys, two agents. Treat it as a personal setup. Free tiers have rate limits, quality changes from model to model, and each provider has its own terms.
Previous part of this series: Claude Code hidden commands. If you want a single provider instead of a router, see Claude Code free with NVIDIA NIM or Claude Code free in VS Code with OpenCode models.
Comparing every free route before you pick one? See how to use Claude Code for free.
- FreeLLMAPI is a local proxy: one unified key in your tools, many provider keys behind it.
- On Windows, download the .exe from the GitHub releases page; the app serves on localhost port 31415.
- With only Google AI Studio, NVIDIA NIM and OpenRouter added, my dashboard showed 140.90 million tokens per month.
- Click Check after adding a key; green means the key is connected and tested.
- The Agents page gives the setup command for OpenCode and Claude Code, and each one asks for the unified key.
- If OpenCode errors after setup, fix the API key in .config\opencode\opencode.json and reopen it.
Is FreeLLMAPI really free?
Does FreeLLMAPI give you Claude models in Claude Code?
What port does FreeLLMAPI run on?
Where do I find the FreeLLMAPI unified API key?
How do I fix the OpenCode error after the FreeLLMAPI setup command?
Do I need a GPU to run FreeLLMAPI?
New posts in your inbox
Subscribe to get every tutorial.