Guide

Cline, Roo Code and Kilo Code with a free API

Cline, Roo Code and Kilo Code are coding agents for VS Code. Each one can use an OpenAI-compatible API. This guide connects them to free models through FreeLLMAPI. It also shows which free models handle the long, tool-heavy prompts that these agents send.

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 | bash

Copy your unified key from the Keys page. All three agents use the same values:

FieldValue
Base URLhttp://localhost:3001/v1
API key<unified-key>
Model IDauto, or a catalog id from GET /v1/models
Roo Code status: the Roo Code README says that the extension was shut down on 15 May 2026. The repository is archived and read-only. The steps below still apply to an existing install, but new users should select Cline or Kilo Code.

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:

  1. Open the Cline panel in VS Code. Click the settings (gear) icon.
  2. Set API Provider to OpenAI Compatible.
  3. Set Base URL to http://localhost:3001/v1.
  4. Set API Key to your unified key.
  5. Set Model ID to auto or to a model from the table below.
  6. 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.

Free models for Cline, Roo Code and Kilo Code: tool calling and 128K+ context
ModelFree onContextFree limits (best offer)ToolsVision
GLM 5.3UnoRouter1M1 req/min
1 req/min per model
YesNo
GLM 5.3 FlashNVIDIA NIM, UnoRouter1M40 req/min
40 RPM
YesYes
Gemini 3.8 FlashGoogle AI Studio1MRecurring provider quotaYesYes
Qwen3.8 Flash NextAMD Radeon Cloud262KRecurring daily account allowanceYesNo
Qwen3.8 FlashElectronHub1M$0.25/week shared recurring creditYesYes
Gemini 3.7 FlashGoogle AI Studio1M10 req/min
20 req/day
250,000 tokens/min
~3M
YesYes
GPT-5.6 LunaElectronHub1M$0.25/week shared recurring creditYesYes
Dots3 Note PreviewKilo Gateway, OpenRouter512K20 req/min
50 req/day
50 req/day account-wide (1,000 after a $10 purchase)
YesYes
DeepSeek V4 FlashAMD Radeon Cloud, BazaarLink, ElectronHub1M10 req/min
50 req/day
Shared rate limit
YesNo
Qwen3.8 27BElectronHub, Groq, 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

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 auto to let the router select a model for each request. When one provider sends a 429 error, the router tries the next model.
  • Use auto:smart for 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

ProblemCauseFix
"Invalid API Key"The key is not your FreeLLMAPI unified keyCopy the unified key again from the Keys page
"Model Not Found"The model id is not in your catalogUse auto or an id from GET /v1/models
The agent stops after one step, or tool calls failThe model has weak or no tool callingSelect a model from the table above
Context window errors on long tasksThe context setting is larger than the model's real contextSet the correct context window, or start a new task
"All models rate-limited after N attempts"Every key in the chain is at its limitAdd keys from more providers, or wait for the cooldowns
Kilo: Model not found: openai-compatible/autoThe default model is not in the provider's model mapRun setup-kilo again, which puts the default model first
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

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.

Sources

All guides · Browse all free models

Keep reading

All posts →
Guide

Best free LLM APIs 2026

Ten genuinely free LLM APIs worth using — ranked, with real limits.

Guide

Unlimited free AI tokens?

No free AI API is unlimited. The closest real thing: 10.1 billion free tokens a month behind one key.

Guide

How to get a free LLM API key

Get a working key in minutes — no credit card required.