Skip to main content

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

  1. A CloudBase environment with its Environment ID (ENV_ID)
  2. A Token Resource Pack purchased
  3. Enable the required models in Console → AI → Text Models
  4. A CloudBase API Key (Console → Environment Settings → API Key)

Configuration

Fill in the following settings in your AI tool:

FieldValue
Base URLhttps://<ENV_ID>.api.tcloudbasegateway.com/v1/ai/cloudbase/v1
API KeyYour CloudBase environment API Key
Modeldeepseek-v4-flash (must be enabled in console; other enabled models also supported)

Replace <ENV_ID> with your actual CloudBase environment ID.

About the Provider

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

  1. Open CodeBuddy Settings → Model Configuration
  2. Select "Add Custom Model", set Provider to OpenAI Compatible
  3. Fill in Base URL and API Key
  4. Set the model name to deepseek-v4-flash

Cursor

  1. Open Cursor Settings → Models
  2. Enter your CloudBase API Key in the OpenAI API Key field
  3. Enter the Base URL in Override OpenAI Base URL
  4. Type deepseek-v4-flash in the model list and enable it

Cline / Roo Code

  1. Open plugin settings → API Provider, select OpenAI Compatible
  2. Fill in Base URL and API Key
  3. 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.