Skip to content
Docs

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, or Ctrl+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.
Shell
npm install -g cline

2. 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-..."

3. Add Libremodel

Open the Cline panel, click the settings icon (⚙️) and fill in:

  1. API Provider: OpenAI Compatible.
  2. Base URL: the URL below.
  3. API Key: your Libremodel key.
  4. Model: a model ID from the table, for example deepseek-v4.1-flash-1017.
Base URL
https://api.libremodel.ai/v1

Then 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 Configuration values per model
ModelContext Window SizeMax Output TokensInput PriceOutput PriceImage Support
kimi-k3.1-pro-uncensored104857613107239Yes
deepseek-v4.1-flash-1017-uncensored10485761310720.250.9Yes
glm-5.3-flash-uncensored10485761310720.31.2Yes
kimi-k3.1-pro104857613107216Yes
deepseek-v4.1-flash-101710485762621440.040.3Yes
minimax-m3.1-flash10485761310720.050.2Yes

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"

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.