Skip to content

Trae

Trae is ByteDance's AI-native IDE, which supports third-party models via the OpenAI-compatible protocol. This page covers both the international (trae.ai) and China (trae.com.cn) editions.

TIP

The core config is identical across both editions — only the menu wording differs. If you use just one, jump to its section.

Prerequisites

FieldValueNotes
Base URLhttps://api.tokone.aiOpenAI-compatible path, note the trailing /v1
API Keysk-xxxGenerated on the console "API Key" page
Default model IDgpt-5.5 or gpt-5.4Full list in Models

Trae international (trae.ai)

1. Open model settings

  • macOS: Cmd + ,, or click the gear icon at the bottom-left → "Settings"
  • Windows / Linux: Ctrl + ,

Find "Models" in the settings sidebar (some versions call it "AI Providers" / "Model Providers" — same thing).

2. Add a custom model

Click "Add Model" / "Add Custom Model", set Provider to OpenAI Compatible, then fill in:

FieldValue
Display Name / NameTokOne GPT-5.5
Base URL / Endpointhttps://api.tokone.ai
API Keyyour sk-xxx
Model ID / Model Namegpt-5.5

Click "Save". If there's a "Verify" / "Test" button, click it to confirm connectivity.

3. Select the model

Back in the chat window, pick "TokOne GPT-5.5" from the model dropdown. To run several models (e.g. gpt-5.5 and gpt-5.4), repeat step 2.

Trae China (trae.com.cn)

The China edition has a Chinese UI; the flow is identical to the international edition, only the menu wording differs.

  1. Open model settings: Cmd + , (macOS) / Ctrl + , (Windows / Linux), find "模型设置" / "AI 模型" in the sidebar.
  2. Click "添加模型" / "新增自定义模型" and set the provider to "OpenAI 兼容".
  3. Fill in: API address https://api.tokone.ai, API key your sk-xxx, model ID gpt-5.5, then "保存".
  4. Pick "TokOne GPT-5.5" from the model dropdown in the chat window.

Verify

Open a new chat window, select your added model, and send Reply with OK. You should see a streamed reply. You can also confirm the request landed on the "Usage" page in the TokOne console — if Trae shows a reply but the console has no record, the request didn't reach TokOne (usually a wrong Base URL).

FAQ

Can't connect / long hang

90% of the time the Base URL is wrong:

Wrong formSymptomCause
https://api.tokone.ai404 Not FoundMissing /v1
https://api.tokone.ai/v1/v1404 Not FoundDuplicate /v1
http://api.tokone.ai/v1SSL / connection refusedProtocol is http
https://api.tokone.ai/v1/404 on some versionsTrailing /

There's exactly one correct form: https://api.tokone.ai/v1.

Added model doesn't show in the dropdown

Check the Provider is set to "OpenAI Compatible" / "OpenAI 兼容". Some Trae versions need a restart after adding a model to refresh the dropdown.

401 / 403

Confirm the key is still enabled on the console "API Key" page; don't copy leading/trailing spaces or newlines — Trae doesn't trim.

"model does not exist" / "model not supported"

The Model ID is wrong. The Model ID is the model's API name, not the "display name". See Models; the common ones are gpt-5.5 and gpt-5.4.

Next steps

  • Models — which models are supported
  • Pricing — how billing works