API Docs
Client Setup

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

FieldValue
API ProviderOpenAI Compatible
Base URLhttps://api.unioapi.com/v1
API KeyYour UnioAPI key
Model IDe.g. gpt-5.6-sol
OpenAI Compatible settings in Cline
public/docs/screenshots/cline-openai-compatible.png · 1600×1000

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)

FieldValue
API ProviderAnthropic
API KeyYour UnioAPI key
Use custom base URLTick it and enter https://api.unioapi.com (no /v1)
Modele.g. claude-sonnet-5
Anthropic custom base URL settings in Cline
public/docs/screenshots/cline-anthropic.png · 1600×1000

The 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

SymptomCheck
404The OpenAI Compatible base URL is missing /v1, or the Anthropic custom URL has an extra /v1
401Wrong or revoked key
402The balance is too low; redeem a CDKEY under Wallet first
400 context_length_exceededThe task context is too long; start a new task, or set the right context window in Model Configuration
One task makes many requestsAn agent calls the model at every step — this is normal; see Usage & billing records

Next steps