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
| Field | Value | Notes |
|---|---|---|
| Base URL | https://api.tokone.ai | OpenAI-compatible path, note the trailing /v1 |
| API Key | sk-xxx | Generated on the console "API Key" page |
| Default model ID | gpt-5.5 or gpt-5.4 | Full 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:
| Field | Value |
|---|---|
| Display Name / Name | TokOne GPT-5.5 |
| Base URL / Endpoint | https://api.tokone.ai |
| API Key | your sk-xxx |
| Model ID / Model Name | gpt-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.
- Open model settings:
Cmd + ,(macOS) /Ctrl + ,(Windows / Linux), find "模型设置" / "AI 模型" in the sidebar. - Click "添加模型" / "新增自定义模型" and set the provider to "OpenAI 兼容".
- Fill in: API address
https://api.tokone.ai, API key yoursk-xxx, model IDgpt-5.5, then "保存". - 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 form | Symptom | Cause |
|---|---|---|
https://api.tokone.ai | 404 Not Found | Missing /v1 |
https://api.tokone.ai/v1/v1 | 404 Not Found | Duplicate /v1 |
http://api.tokone.ai/v1 | SSL / connection refused | Protocol is http |
https://api.tokone.ai/v1/ | 404 on some versions | Trailing / |
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.