Before you start
FreeLLMAPI is an open-source gateway that runs on your computer. It pools the free tiers of 45 providers behind one key. Install it in Docker, then add at least two free provider keys on the Keys page.
Install on macOS or Linux
curl -fsSL https://freellmapi.co/install.sh | bashCopy your unified key from the Keys page. All three agents use the same values:
| Field | Value |
|---|---|
| Base URL | http://localhost:3001/v1 |
| API key | <unified-key> |
| Model ID | auto, or a catalog id from GET /v1/models |
Cline
The fastest method is the setup command. It reads your live catalog, makes a backup of the existing Cline settings and adds an OpenAI Compatible provider.
One command
npx freellmapi setup-cline --url http://localhost:3001 --api-key <unified-key> --dry-run
npx freellmapi setup-cline --url http://localhost:3001 --api-key <unified-key>The first line shows the diff and writes nothing. The second line writes the change. To set up Cline manually, do these steps:
- Open the Cline panel in VS Code. Click the settings (gear) icon.
- Set API Provider to OpenAI Compatible.
- Set Base URL to
http://localhost:3001/v1. - Set API Key to your unified key.
- Set Model ID to
autoor to a model from the table below. - Open Model Configuration. Set Context Window to the context of your model. Turn on Image Support only for a vision model.
Cline shows this note for OpenAI Compatible providers: "Cline uses complex prompts, so behavior can vary across models." For smaller models, the Cline docs recommend Use Compact Prompt in Cline Settings, Features.
Kilo Code
Run the setup command. It writes a global Kilo config with an openai-compatible provider and makes it the default model.
One command
export FREELLMAPI_API_KEY=<unified-key>
npx freellmapi setup-kilo --url http://localhost:3001 --dry-run
npx freellmapi setup-kilo --url http://localhost:3001
kilo run "Say hello"The config refers to the key as {env:FREELLMAPI_API_KEY}, so export the variable before you start Kilo. Kilo expands {env:...} only in trusted config, for example the global folder ~/.config/kilo. In a project config, Kilo ignores it and logs a warning. The generated config has this shape:
Kilo global config (shape)
{
"$schema": "https://app.kilo.ai/config.json",
"model": "openai-compatible/auto",
"provider": {
"openai-compatible": {
"options": {
"apiKey": "{env:FREELLMAPI_API_KEY}",
"baseURL": "http://localhost:3001/v1"
},
"models": {
"auto": {
"name": "Auto",
"tool_call": true,
"limit": { "context": 128000, "output": 8192 }
}
}
}
}
}In the VS Code extension, you can also add the provider manually. Open Settings, then the Providers tab, then click Custom provider. Set Provider API to OpenAI Compatible. Enter the base URL and key, then click Fetch models to read the model list.
Roo Code (existing installs)
The setup command writes an import file for the VS Code extension. It also writes a profile for the Roo CLI.
One command
npx freellmapi setup-roo --url http://localhost:3001 --api-key <unified-key>Then tell Roo Code to load the import file. Add this line to your VS Code settings.json and reload the window. The freellmapi profile becomes the current profile.
VS Code settings.json
"roo-cline.autoImportSettingsPath": "~/.roo/freellmapi.json"To set it up manually, open the Roo Code settings and set API Provider to OpenAI Compatible. Enter the base URL, key and model. Roo Code uses native tool calling only. Its docs say that a model without native tool calling cannot be used with Roo Code.
Choose models for agent work
These agents send a large system prompt, tool definitions and file contents in each request. Use models with tool calling and a large context window. The table shows free models with tool calling and at least 128K context today, by intelligence.
| Model | Free on | Context | Free limits (best offer) | Tools | Vision |
|---|---|---|---|---|---|
| GLM 5.3 | UnoRouter | 1M | 1 req/min 1 req/min per model | Yes | No |
| GLM 5.3 Flash | NVIDIA NIM, UnoRouter | 1M | 40 req/min 40 RPM | Yes | Yes |
| Gemini 3.8 Flash | Google AI Studio | 1M | Recurring provider quota | Yes | Yes |
| Qwen3.8 Flash Next | AMD Radeon Cloud | 262K | Recurring daily account allowance | Yes | No |
| Qwen3.8 Flash | ElectronHub | 1M | $0.25/week shared recurring credit | Yes | Yes |
| Gemini 3.7 Flash | Google AI Studio | 1M | 10 req/min 20 req/day 250,000 tokens/min ~3M | Yes | Yes |
| GPT-5.6 Luna | ElectronHub | 1M | $0.25/week shared recurring credit | 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 |
| DeepSeek V4 Flash | AMD Radeon Cloud, BazaarLink, ElectronHub | 1M | 10 req/min 50 req/day Shared rate limit | Yes | No |
| Qwen3.8 27B | ElectronHub, 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 |
Showing 12 of 109 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.
- Use
autoto let the router select a model for each request. When one provider sends a 429 error, the router tries the next model. - Use
auto:smartfor planning and difficult bugs. - Set the context window in the agent to the real context of the model. If the value is too high, the agent sends prompts that the model refuses.
- Start a new task when the context gets large. A smaller context uses fewer tokens per request.
Troubleshooting
| Problem | Cause | Fix |
|---|---|---|
| "Invalid API Key" | The key is not your FreeLLMAPI unified key | Copy the unified key again from the Keys page |
| "Model Not Found" | The model id is not in your catalog | Use auto or an id from GET /v1/models |
| The agent stops after one step, or tool calls fail | The model has weak or no tool calling | Select a model from the table above |
| Context window errors on long tasks | The context setting is larger than the model's real context | Set the correct context window, or start a new task |
| "All models rate-limited after N attempts" | Every key in the chain is at its limit | Add keys from more providers, or wait for the cooldowns |
Kilo: Model not found: openai-compatible/auto | The default model is not in the provider's model map | Run setup-kilo again, which puts the default model first |
Frequently asked questions
Can I use Cline for free?
Yes. Cline is free and open source. Set its API provider to OpenAI Compatible and point it at FreeLLMAPI. The gateway sends each request to free provider tiers, so inference costs $0.
Which free model is best for Cline?
Use a model with tool calling and at least 128K context. Cline sends complex prompts with tool definitions. The table on this page shows the strongest free models that meet both rules today.
Is Roo Code still maintained?
No. The Roo Code README says that the extension was shut down on 15 May 2026, and the repository is archived. Existing installs still work with an OpenAI Compatible provider.
How do I use Kilo Code with a custom OpenAI-compatible API?
Add an openai-compatible provider with a baseURL and an apiKey in the global Kilo config, or run npx freellmapi setup-kilo. In the VS Code extension, use Settings, Providers, Custom provider.
Why does Cline fail with free models?
Most failures come from models with weak tool calling or a small context window. Select a model with tool calling and 128K context, and turn on Use Compact Prompt for smaller models.
Related guides
- Free AI models in VS Code
- Continue with a free LLM API
- Best free coding model APIs
- Free LLM API with function calling
- How to use Claude Code for free
Sources
- Cline docs: OpenAI Compatible provider (checked 20 November 2026)
- Cline docs: running models locally (checked 20 November 2026)
- Kilo docs: custom models (checked 20 November 2026)
- Kilo docs: OpenAI Compatible provider (checked 20 November 2026)
- Roo Code repository (archived) (checked 20 November 2026)
- Roo Code docs: settings management (checked 20 November 2026)
- FreeLLMAPI docs: clients and coding agents (checked 20 November 2026)