AGTCloud API Docs
GuidesAPI ReferenceIntegrations and resourcesUpdate and help

Cline

Configure and use AGTCloud in Cline.

Cline is a programmable agent running within an IDE that can read project files, execute commands, and modify code after obtaining permission. By configuring the OpenAI Compatible Provider, Cline can use AGTCloud's Chat Completions compatible entry.

This tutorial introduces Cline IDE extensions. Different models may support different ranges for tool calls, image input, computer use, and context length. Please select models that are available to the current API Key and support Chat Completions and tool calls.

Preparation

Before you start, please confirm that you have:

  • Install a supported VS Code-compatible editor or JetBrains IDE;
  • Register and log in to AGTCloud;
  • Create a token on the API Keys page;
  • Copy the model ID of the current token available and supporting Chat Completions from Model Marketplace
  • Prepare a test project that does not contain sensitive code.

Install Cline

Choose the installation method that matches your IDE. Cline also offers CLI, SDK, and Kanban formats, which this tutorial will not elaborate on.

Compatible with editors such as VS Code, Cursor, Windsurf, VSCodium, etc.:

  1. Expand the market, or by Ctrl/Cmd + Shift + X;
  2. Search Cline;
  3. Select the official Cline extension and click Install;
  4. Click the Cline icon in the Activity Bar, or run Cline: Open In New Tab from the Command Palette.

Windsurf and VSCodium use Open VSX, and the installation process is basically the same.

If Cline displays authorization or initialization prompts on first launch, follow the instructions in the current interface. For other installation methods, see the official Cline installation documentation.

Configure AGTCloud

Open API Configuration

Open the Cline panel, click the Settings icon, and then go to API Configuration. The settings entry location may vary slightly depending on the IDE and Cline version.

Choose a compatible provider

Under API Provider, select OpenAI Compatible. Do not select the built-in OpenAI Provider.

Fill in the connection information

Cline fieldValue
API ProviderOpenAI Compatible
Base URLhttps://api.agtcloud.cn/v1
OpenAI Compatible API Keyyour-api-key
Model ID or ModelMODEL_ID
Custom HeadersLeave it blank by default

Please replace your-api-key and MODEL_ID with your own token and model ID.

Verify and save

If the current version provides a Verify button, test the connection first. After verification succeeds, click Done or the equivalent save button to finish the setup.

The base URL must include /v1

Cline's OpenAI Compatible provider requires the complete API Base URL. Use https://api.agtcloud.cn/v1; do not enter only the API Origin or append another /v1, which would produce /v1/v1.

Cline Provider configuration interface

Select and configure the model

MODEL_ID is a placeholder, not a real model name. From the Model Marketplace, copy the full ID of a model that is available to the current API Key and supports Chat Completions and tool calls.

Cline's Model Configuration may include advanced options such as Context Window, Max Output Tokens, Image Support, Computer Use, Input Price, and Output Price. Keep the defaults during the initial connection, and adjust them only after confirming the target model's actual limits and capabilities.

Advanced configurations are not sources of model capability

Checking Image or Computer Use support in Cline will not grant new capabilities to models that do not have them. The price field is mainly used for local usage estimation in Cline and does not represent the final AGTCloud billing results.

Start and verify the connection

Open the test project

Use projects that do not contain sensitive code and confirm the presence of securely readable README.md.

Keep automatic approval closed

Do not enable Auto Approve during the first validation. When Cline prepares to read files, execute commands, or modify code, first review the operation before deciding whether to allow it.

Initiate read-only tasks

Send in the Cline input box:

Please read the README.md and summarize the project's purpose in three points. Do not modify any files.

Inspection results

Cline can read files and return generalizations normally, with no unauthorized modifications, indicating that the base connection has been established. This step generates normal API usage.

Cline task execution interface

Frequently Asked Questions

IssueWhat to checkResolution
Cline extension not displayedInstallation source, IDE compatibility, and restart statusConfirm that the official Cline extension is installed, then reload or restart the IDE
Verify Connection failureNetwork and Base URLConfirm that the local machine can access AGTCloud and use the full version https://api.agtcloud.cn/v1
Returns 401API Key value and token statusCopy a valid API Key again and make sure the field contains no extra spaces
Returns 403Token permissions, model permissions, and account statusCheck the token status and the models available to the current account in the console
Returns 404Base URL, duplicated /v1, and model IDConfirm that the URL does not contain /v1/v1, then copy the complete model ID again
Model Not FoundModels visible to the current API Key and protocol supportSelect a model available to the current API Key that supports Chat Completions
The conversation is normal, but the tool failsTool invocation capabilities and advanced configurationSwitch to a model that supports tool calls and check context and output upper limit configurations
Image input or Computer Use failsThe model's actual capabilitiesDo not rely only on the options shown by Cline; confirm what the target model actually supports
Result anomalies or connection interruptionsNetwork proxies, model parameters, and context constraintsFirst, restore the default advanced configuration, then check the proxy, firewall, and model context restrictions

If you encounter issues that cannot be located, record the request time, model ID, HTTP status, and redacted error messages, then review Error & Troubleshooting. Do not submit the full API Key.

Safety advice

  • Do not write API keys into project files, Git repositories, screenshots, logs, or shared configurations;
  • Do not conduct initial validation on projects that include production credentials, private data, or undisclosed source code;
  • For the first use, keep Auto Approve off, and only allow execution after confirming each operation;
  • When sharing devices with multiple users, after use, the API Key saved in Cline is cleared.

Next

On this page