Skip to content

Trae IDE Configuration Guide

What is Trae IDE

Trae IDE is an AI programming assistant developed by ByteDance that supports connecting to third-party APIs through the built-in Cline plugin.

Note

Trae IDE itself has removed the official entry for custom service providers and custom Base URL, only supporting built-in partner models. Using the Cline plugin is the only viable solution.

Install Cline Plugin

  1. Open Trae IDE
  2. Click the Extensions icon in the left activity bar
  3. Search for Cline (look for the official fox logo)
  4. Click Install

Configure API

1. Get API Key

  1. Log in to ai.TokenHub dashboard
  2. Go to "API Keys" page
  3. Click "Add Key" to get your API Key (starts with sk-)

2. Configure Cline

  1. Click the Cline icon in the left activity bar of Trae IDE
  2. Go to Settings page
  3. Find the API Configuration section
  4. Select Custom API Endpoint

3. Fill in Configuration

ParameterValueDescription
Base URLhttps://ai-tokenhub.com/v1API service address
API Keysk-xxxxxxxxxxxxxxxxYour API key
Model IDclaude-sonnet-4-20250514Model name to use

Note

Model ID must exactly match the supported model name on ai.TokenHub platform, case-sensitive. You can view the available models on the platform's "Models" page.

4. Save Configuration

After filling in the configuration, click Save. The configuration takes effect immediately without restarting Trae IDE.

Common Configuration Examples

Claude Model

ParameterValue
Base URLhttps://ai-tokenhub.com/v1
Model IDclaude-sonnet-4-20250514

GPT Model

ParameterValue
Base URLhttps://ai-tokenhub.com/v1
Model IDgpt-4o

DeepSeek Model

ParameterValue
Base URLhttps://ai-tokenhub.com/v1
Model IDdeepseek-v3

Plugin Automation Settings

In Cline Settings, you can configure the plugin's automation behavior:

  • Auto-approve: Set whether to automatically approve file read/write and security commands
  • It is recommended to configure carefully according to your needs to avoid security risks

FAQ

Request Failed 404

Check if Base URL is correct, no extra / at the end.

Authentication Failed 401

Check if API Key is correct, ensure no extra spaces or characters.

Model Not Found

Ensure Model ID exactly matches the supported model name on the platform, case-sensitive.

Network Connection Timeout

Check network connectivity and ensure you can access https://ai-tokenhub.com.