How to connect Cline to apimodels.app
Cline is an open-source coding agent that runs as a VS Code extension and as a command-line tool. It talks to any endpoint that speaks the OpenAI chat format, which is how you point it at apimodels.app: one key, one address, and you switch models by changing the model ID.
The labels below were read from the Cline source on 17 November 2026 (VS Code extension 4.1.26, CLI 3.0.74). Later versions may rename things.
Setup in VS Code
Open the Cline panel, click the settings icon, and fill the form in this order.
| Field | What to enter |
|---|---|
| API Provider | OpenAI Compatible |
| Base URL | https://api.apimodels.app/v1 |
| OpenAI Compatible API Key | Your apimodels.app key |
| Model ID | Pick from the list, for example claude-opus-5-5, qwen4-max or gpt-6-sol |
| Custom Headers | Leave empty |
| Set Azure API version / Use Azure Identity Authentication | Leave unchecked |
The model list loads by itself
Cline has no fetch button. About half a second after you finish typing the Base URL and key it requests the model list from the address you entered, and Model ID turns into a dropdown. If the list does not load, Model ID stays a plain text box and the error appears under it; check the address and key first.
The list contains every model on your key, including image and audio models that are not chat models. Pick a language model. If the one you want is not shown, choose "Use custom model ID…" at the end of the list and type it.
Fill in Model Configuration
For a custom endpoint Cline falls back to generic defaults: a 128,000-token context window and prices of 0. Leave the prices at 0 and Cline will show every request as costing $0. Expand Model Configuration and set the real values for the model you picked.
| Model ID | Context Window Size | Input Price / 1M tokens | Output Price / 1M tokens | Supports Images |
|---|---|---|---|---|
| claude-opus-5-5 | 1000000 | 2.40 | 12.00 | On |
| qwen4-max | 1000000 | 1.50 | 4.50 | On |
| gpt-6-sol | Leave the default | 1.00 | 5.00 | On |
Setup from the command line
The Cline CLI takes the same four values as flags. Run the command in the code box below, with your own key and the model you want. Use cline auth with no flags for the interactive version.
How to check that it works
There is no test button in the current settings form. Two things tell you the connection is good: the model list loads, and a first small task (for example "list the files in this folder") gets an answer.
Limits and things that go wrong
Use OpenAI Compatible, not the Anthropic provider, for Claude models here. Cline's Anthropic provider has a "Use custom base URL" checkbox, but its model field only offers Cline's built-in list, so it cannot select other vendors' models.
Agents use a lot of tokens. Cline sends long prompts and many tool calls per task. Watch the cost on the first few tasks before leaving it to run unattended.
Thinking models start slowly. qwen4-max finishes thinking before it writes, so the first output can take tens of seconds.
Not every model suits an agent. Cline's own form warns that behaviour varies across models and less capable ones may not work as expected. Start with a strong coding model.
Sources
Field labels, defaults and behaviour were read from the Cline repository (main branch, VS Code extension 4.1.26, CLI 3.0.74) on 17 November 2026. We did not test every Cline version. Prices are our current prices and may change.
Inicio rápido
cURL
# Cline CLI: one-line setup
cline auth -p openai-compatible \
-k $APIMODELS_API_KEY \
-m claude-opus-5-5 \
-b https://api.apimodels.app/v1
# Check the endpoint and key outside Cline
curl https://api.apimodels.app/v1/models \
-H "Authorization: Bearer $APIMODELS_API_KEY"Preguntas frecuentes
Should the Base URL in Cline end with /v1?
Yes. Enter https://api.apimodels.app/v1. Current Cline uses the Base URL exactly as typed and does not add /v1 for you.
Why does Cline show $0 for every request?
For a custom endpoint the input and output prices default to 0. Open Model Configuration and enter the prices for your model. This only changes what Cline displays; what you are charged is on your apimodels.app usage page.
Can I use Claude models in Cline through apimodels.app?
Yes. Choose the OpenAI Compatible provider and set Model ID to claude-opus-5-5 or claude-sonnet-5-5. Do not use the Anthropic provider for this; its model field only offers the built-in list.
How do I switch models?
Change Model ID and update the context window and prices under Model Configuration. The Base URL and key stay the same.
