Coding agents
Use Libremodel in Cline
Cline takes any OpenAI-compatible provider. Add us in its settings with each model's context window and prices, and the task header shows what every task costs.
1. Install Cline
- In VS Code, open Extensions (
Cmd+Shift+X, orCtrl+Shift+X), search for Cline and click Install. Cursor, Windsurf and VSCodium install it the same way. - In JetBrains IDEs, go to Settings, Plugins and Marketplace, search for Cline, install it and restart the IDE.
- For the terminal, install the CLI with npm. It needs Node.js 20 or later.
npm install -g cline2. Set your API key
Create a key in API keys and save it as LIBREMODEL_API_KEY. On macOS and Linux, add the line to ~/.zshrc or ~/.bashrc so every new terminal has it.
export LIBREMODEL_API_KEY="sk-libremodel-..."[Environment]::SetEnvironmentVariable("LIBREMODEL_API_KEY", "sk-libremodel-...", "User")3. Add Libremodel
Open the Cline panel, click the settings icon (⚙️) and fill in:
- API Provider: OpenAI Compatible.
- Base URL: the URL below.
- API Key: your Libremodel key.
- Model: a model ID from the table, for example
deepseek-v4.1-flash-1017.
https://api.libremodel.ai/v1Then open Model Configuration and enter the values of that model. With them, Cline knows when the conversation is close to the context window and what each request costs. Prices are in dollars per million tokens.
| Model | Context Window Size | Max Output Tokens | Input Price | Output Price | Image Support |
|---|---|---|---|---|---|
kimi-k3.1-pro-uncensored | 1048576 | 131072 | 3 | 9 | Yes |
deepseek-v4.1-flash-1017-uncensored | 1048576 | 131072 | 0.25 | 0.9 | Yes |
glm-5.3-flash-uncensored | 1048576 | 131072 | 0.3 | 1.2 | Yes |
kimi-k3.1-pro | 1048576 | 131072 | 1 | 6 | Yes |
deepseek-v4.1-flash-1017 | 1048576 | 262144 | 0.04 | 0.3 | Yes |
minimax-m3.1-flash | 1048576 | 131072 | 0.05 | 0.2 | Yes |
When you switch models, change these values along with Model.
4. Start a task
Open a new task in the Cline panel. The task header shows the estimated cost, updated after each request with the prices you entered. In the terminal, cline auth runs the same setup, and cline starts a task.
Troubleshooting
Run this in the same terminal you start the tool from. It costs nothing. A list of models means the key is fine. A 401 means LIBREMODEL_API_KEY is empty or wrong in that terminal; open a new one after saving it.
curl -s https://api.libremodel.ai/v1/models -H "Authorization: Bearer $LIBREMODEL_API_KEY"curl.exe -s https://api.libremodel.ai/v1/models -H "Authorization: Bearer $env:LIBREMODEL_API_KEY"If the key is fine and the tool gets a 402, your balance does not cover the request. See Billing and credits.
Notes
Agents that run subagents send several requests at once. When capacity is busy, the extra ones wait in a short queue instead of failing. See Limits and errors.
The cost in Cline is an estimate. What you are actually charged, cache savings included, is in Activity.