Skip to content

Configure Cline ​

Cline is an AI coding agent for VS Code that can read projects, edit files, and run commands. Use its OpenAI Compatible provider to connect LAYSO AI models.

One key for every platform model

One LAYSO AI API key can access platform models. Successful requests have itemized charges at the selected model's current price; failed tasks are not charged.

Prerequisites ​

Configuration steps ​

Step 1: install Cline ​

Open the VS Code Extensions view, search for Cline, confirm that both the extension name and publisher are Cline, and select Install.

Step 2: open Cline settings ​

Open the Cline panel after installation, then select the gear icon in the upper-right corner to open Settings.

Step 3: configure LAYSO AI ​

Select API Configuration in the sidebar and enter:

SettingValue
API ProviderOpenAI Compatible
Base URLhttps://api.layso.ai/v1
OpenAI Compatible API KeyComplete key copied from the LAYSO AI API Keys page
Model IDExact model ID copied from Models & Pricing

The Base URL ends at /v1. Do not append /chat/completions, /responses, or a model name. The model in the screenshot is only an example; use current information from Models & Pricing.

Set Reasoning Effort, context length, and other model options according to the selected model's actual capabilities. Select Done in the upper-right corner when finished.

Step 4: send a test message ​

Return to the Cline conversation and confirm that the configured model appears below the input box. Send a short read-only task such as:

text
Introduce yourself without modifying any files.

A normal response marked COMPLETED confirms the connection. You can then verify the model, token use, and itemized charge in the LAYSO AI user app.

Usage recommendations ​

  • Start with a read-only task to verify the provider, model, and workspace.
  • Review proposed file changes and terminal commands before approving them.
  • Do not grant broad Auto Approve permissions unless the current task genuinely requires them.
  • Create a recoverable version-control commit or checkpoint before large changes.
  • Never expose a complete API key in project files, screenshots, logs, or a Git repository.

Troubleshooting ​

SymptomWhat to check
The Cline icon is missingRun Cline: Open In New Tab or reload the VS Code window
Invalid API Key or 401 / 403Copy the API key again and make sure it contains no spaces, line breaks, or missing characters
404The Base URL must be https://api.layso.ai/v1; do not duplicate /v1 or append a request path
Model Not FoundCopy the exact model ID from Models & Pricing and confirm the provider is OpenAI Compatible
Tool use is unavailableConfirm that the selected model supports tool calling and review Cline's model settings
Cline's estimate differsCline's value is a local estimate; the LAYSO AI itemized charge is authoritative

Official references ​

LAYSO AI API 文档