VS Code + Cline Setup
Connect the Cline extension for VS Code to UnioAPI — OpenAI Compatible for GPT models, Anthropic with a custom base URL for Claude models — plus model settings and FAQ.
Cline is an open-source coding agent in VS Code that can edit files and run commands. It connects to UnioAPI in two ways:
- GPT models: API Provider OpenAI Compatible, using
POST /v1/chat/completions. - Claude models: API Provider Anthropic with a custom base URL, using
POST /v1/messages.
Settings depend on your version
Cline changes quickly; setting names and positions may move.
Prerequisites
- VS Code with the Cline extension installed from the marketplace.
- A topped-up UnioAPI account and an API key.
GPT models (OpenAI Compatible)
Open the settings
Click the Cline icon in the activity bar and open the settings in the top-right corner of the Cline panel.
Enter the connection details
| Field | Value |
|---|---|
| API Provider | OpenAI Compatible |
| Base URL | https://api.unioapi.com/v1 |
| API Key | Your UnioAPI key |
| Model ID | e.g. gpt-5.6-sol |
public/docs/screenshots/cline-openai-compatible.png · 1600×1000Set model parameters (recommended)
Expand Model Configuration and enter the context window and max output from the model page, and tick the capabilities the model supports (such as image input). Otherwise Cline truncates context using conservative defaults.
Claude models (Anthropic)
| Field | Value |
|---|---|
| API Provider | Anthropic |
| API Key | Your UnioAPI key |
| Use custom base URL | Tick it and enter https://api.unioapi.com (no /v1) |
| Model | e.g. claude-sonnet-5 |
public/docs/screenshots/cline-anthropic.png · 1600×1000The Anthropic protocol gives Claude the most complete fields for prompt caching, thinking and similar features.
Verify
Give Cline a simple task, such as "list the files in this folder". If it runs and the call shows up in the console's Request logs, you are connected.
FAQ
| Symptom | Check |
|---|---|
| 404 | The OpenAI Compatible base URL is missing /v1, or the Anthropic custom URL has an extra /v1 |
| 401 | Wrong or revoked key |
| 402 | The balance is too low; redeem a CDKEY under Wallet first |
400 context_length_exceeded | The task context is too long; start a new task, or set the right context window in Model Configuration |
| One task makes many requests | An agent calls the model at every step — this is normal; see Usage & billing records |
Next steps
Cursor API Setup
Configure a UnioAPI API key and custom OpenAI Base URL in Cursor. Follow the setup steps to connect available models and verify API access.
Kilo Code Setup
Connect the Kilo Code extension for VS Code / JetBrains to UnioAPI — OpenAI Compatible for GPT models, Anthropic with a custom base URL for Claude models.