# Cline setup: connect the OpenAI Compatible provider

> Configure Cline in VS Code with the OpenAI Compatible provider: base URL, API key and model id for Claude, GPT, Grok or DeepSeek, then verify it and fix errors.

Source: https://oneaiapikey.com/docs/guides/cline

Base URL: `https://api.oneaiapikey.com/v1`

Cline is an autonomous coding agent that runs inside VS Code (and compatible editors). It supports any service that implements the OpenAI Chat Completions format through its **OpenAI Compatible** provider. Point that provider at our gateway and Cline can drive Claude, GPT, Grok or DeepSeek with a single key, charged to your prepaid balance at the published per-token rates.

## What you need

- VS Code (or a VS Code-based editor) with the Cline extension installed.
- A funded account; top-ups start at $3: [create yours](https://oneaiapikey.com/console/sign-up).
- An API key from the [API keys page](https://oneaiapikey.com/console/keys). It starts with `sk-`.

## Step 1: open Cline’s provider settings

Click the Cline icon in the editor’s activity bar to open the Cline panel, then click the **settings (gear) icon** at the top of the panel. The API configuration section is where you choose a provider.

## Step 2: choose OpenAI Compatible and fill in the fields

Set **API Provider** to **OpenAI Compatible**, then enter:

Cline provider settings:

```text
API Provider:  OpenAI Compatible
Base URL:      https://api.oneaiapikey.com/v1
API Key:       sk-your-key-here
Model ID:      claude-sonnet-5
```

- **Base URL** includes `/v1`. Cline adds `/chat/completions` on its own.
- **API Key** is the `sk-` key from your console.
- **Model ID** is any id from the table below, typed exactly.

Click **Done** (or close settings) to save. If your version of Cline offers separate models for **Plan** and **Act** modes, you can give each mode its own model id from the same provider: for example a flagship for planning and a cheaper model for edits.

## Step 3: optional model configuration

Below the main fields, Cline has a **Model Configuration** section. It controls how Cline itself behaves, not what the gateway does:

- **Supports images**: enable it for models that accept image input (the Claude and GPT models do) if you want to paste screenshots.
- **Context window size** and **max output tokens**: if you’re unsure, leave the defaults. Setting a context window larger than the model supports causes errors on very long tasks.
- **Input / output price**: fill these in from the table below if you want Cline’s running cost estimate to match what we actually charge. Your console’s usage log is always the source of truth.

## Recommended models

Cline relies heavily on tool calling and long, multi-step plans, so stronger models pay for themselves in fewer retries. Prices are USD per 1M tokens:

| Model id | Good for | Input | Output |
| --- | --- | --- | --- |
| `claude-sonnet-5` | Daily coding, Code review, Writing | $2.20 | $11 |
| `claude-opus-5-5` | Agentic coding, Large refactors, Complex reasoning | $4.40 | $22 |
| `gpt-6.1-sol` | Codex CLI, Tool calling, Long context | $2.20 | $11 |
| `deepseek-v4-flash` | Budget coding, Sub-agents, Batch jobs | $0.24 | $0.96 |

A sensible split: `claude-sonnet-5` for day-to-day Act mode, `claude-opus-5-5` when a task needs deep reasoning, and `deepseek-v4-flash` for cheap bulk edits. All models are listed on the [models page](https://oneaiapikey.com/models).

## Step 4: verify it works

Start a new Cline task with something harmless, such as “List the files in this folder and summarise the project in two sentences”. Cline should respond and ask permission for its first tool call. Within a few seconds the request shows up in the usage log in your console.

To check the key independently of Cline, list the models available to it:

curl:

```bash
curl -sS https://api.oneaiapikey.com/v1/models -H "Authorization: Bearer sk-your-key-here"
```

A JSON list of model ids means the key and URL are good, so any remaining problem lies in the Cline settings.

## Troubleshooting

**401 Unauthorized / invalid API key.** Re-paste the key from the console without spaces, make sure it hasn’t been disabled, and confirm your balance is above zero.

**404 Not Found.** The base URL is missing `/v1`, or it includes a full endpoint path. Use exactly `https://api.oneaiapikey.com/v1`.

**“Model not found” or “no available channel”.** The Model ID doesn’t match a catalogue id. Ids are lowercase and use the exact dots and dashes shown above, with no provider prefix.

**The task stalls or ends with a timeout on long outputs.** Cline streams responses, which keeps long generations alive through proxies. In your own scripts, send `"stream": true` for long outputs, because proxies cut idle non-streaming requests at roughly 100 seconds. If a very long task keeps failing, start a fresh task so the context is smaller.

**Tool calls fail or the model ignores Cline’s instructions.** Smaller models sometimes struggle with Cline’s tool format. Switch to `claude-sonnet-5` or `gpt-6.1-sol` and retry.

**Context window exceeded.** Lower the context window in Model Configuration to the model’s real limit, or start a new task.

## Next steps

Setting up a teammate on another editor? See the [Kilo Code](https://oneaiapikey.com/docs/guides/kilo-code) and [Zed](https://oneaiapikey.com/docs/guides/zed) guides, or the full list of [tool guides](https://oneaiapikey.com/docs/guides). The [quickstart](https://oneaiapikey.com/docs/quickstart) covers calling the API directly, and current rates are on the [pricing page](https://oneaiapikey.com/pricing).

## Other OpenAI format tools

- [Codex CLI CLI](https://oneaiapikey.com/docs/guides/codex-cli)
- [Cursor IDE](https://oneaiapikey.com/docs/guides/cursor)
- [Kilo Code Extension](https://oneaiapikey.com/docs/guides/kilo-code)
