AI Tools
CloudBase AI is compatible with both OpenAI Chat Completions and Anthropic Messages API protocols, so any AI tool that supports a custom API endpoint (such as CodeBuddy, Cursor, Cline, Claude Code, etc.) can be connected to CloudBase large models.
Prerequisites
- A CloudBase environment with its Environment ID (
ENV_ID) - A Token Resource Pack purchased
- Enable the required models in Console → AI → Text Models
- A CloudBase API Key (Console → Environment Settings → API Key)
Configuration
Fill in the following settings in your AI tool:
| Field | Value |
|---|---|
| Base URL | https://<ENV_ID>.api.tcloudbasegateway.com/v1/ai/cloudbase/v1 |
| API Key | Your CloudBase environment API Key |
| Model | deepseek-v4-flash (must be enabled in console; other enabled models also supported) |
Replace <ENV_ID> with your actual CloudBase environment ID.
The cloudbase segment in the Base URL is CloudBase's unified provider, applicable to all models purchased via Token Resource Pack (DeepSeek, Hunyuan, Kimi, GLM, etc.). See the full model list.
Tool-specific Configuration
CodeBuddy
- Open CodeBuddy Settings → Model Configuration
- Select "Add Custom Model", set Provider to
OpenAI Compatible - Fill in Base URL and API Key
- Set the model name to
deepseek-v4-flash
Cursor
- Open Cursor Settings → Models
- Enter your CloudBase API Key in the OpenAI API Key field
- Enter the Base URL in Override OpenAI Base URL
- Type
deepseek-v4-flashin the model list and enable it
Cline / Roo Code
- Open plugin settings → API Provider, select
OpenAI Compatible - Fill in Base URL and API Key
- Set Model ID to
deepseek-v4-flash
Claude Code
Claude Code supports custom API endpoints via environment variables. When configured with CloudBase, it consumes tokens from your CloudBase Token Resource Pack.
Set the following environment variables before launching Claude Code:
export ANTHROPIC_BASE_URL="https://<ENV_ID>.api.tcloudbasegateway.com/v1/ai/cloudbase"
export ANTHROPIC_AUTH_TOKEN="<YOUR_CLOUDBASE_API_KEY>"
claude
To persist these settings, add them to your shell profile (e.g., ~/.zshrc or ~/.bashrc):
echo 'export ANTHROPIC_BASE_URL="https://<ENV_ID>.api.tcloudbasegateway.com/v1/ai/cloudbase"' >> ~/.zshrc
echo 'export ANTHROPIC_AUTH_TOKEN="<YOUR_CLOUDBASE_API_KEY>"' >> ~/.zshrc
source ~/.zshrc
Other OpenAI-compatible Tools
In your tool's model settings, replace the OpenAI endpoint with the Base URL above and provide your CloudBase API Key.