TRAE setup: API key, Base URL, and models
Install TRAE, configure the BetterToken Base URL and API key, choose an available model, and troubleshoot common errors. Includes setup guidance.
To connect TRAE to BetterToken, prepare an API key, use the full request URL shown below, and choose a current Model ID from the model plaza. This guide uses full-URL mode. If your client offers a Full URL switch, turn it on for this address. Field names and URL modes can vary by region and version; check the controls shown in your client.
Key settings
| Field | Value |
|---|---|
| API Key | BetterToken API key |
| Full request URL | https://bettertoken.ai/v1/chat/completions |
| Model | A current Model ID from the model plaza |
Prerequisites
- The current version of the tool is installed
- A BetterToken API key: register and get one
- A Model ID from the model plaza
Already have an account? Sign in, top up, then create a key in the console.
Additional requirements
Install
Install or open TRAE, then continue with the manual setup below.
Manual setup
| Field | Value |
|---|---|
| API Key | BetterToken API key |
| Full request URL | https://bettertoken.ai/v1/chat/completions |
| Model | A current Model ID from the model plaza |
Setup
Open settings
In IDE mode, click the Settings icon in the upper-right corner to open the settings center.
You can also open SOLO mode and click the Settings icon in the upper-right corner of the chat panel.
Open the model panel
In the left navigation, choose Model to open the Model panel.
Add a model
Click + Add model.

Fill in the model configuration
When the Add model window appears, fill in the fields as follows:
| Field | Value |
|---|---|
| Provider | OpenAI |
| Model | Custom model |
| Model ID | a model ID copied from the model plaza |
| API key | your API Key copied from the BetterToken console |
| Custom request URL | https://bettertoken.ai/v1/chat/completions |

Save and start using it
Click Confirm to save the configuration, then choose the new model.
Verify the connection
Send a short test prompt. If the tool returns a response without an authentication or Model ID error, the connection works. Fully restart the tool after changing its configuration.
Switch models
Open the model selector or change the Model field in the configuration. Use the exact Model ID from the model plaza, then restart the current session.
Common errors
| Error | What to check |
|---|---|
401 or Unauthorized | Check the BetterToken API key and remove leading or trailing spaces. |
404 | In full-URL mode, use exactly https://bettertoken.ai/v1/chat/completions. If your client has a Full URL switch, turn it on so the endpoint path is not appended again. |
model not found | Copy a current Model ID from the model plaza. |
| Changes do not apply | Save the configuration and fully restart the tool. |
Technical details
Protocol, endpoint, and internal provider fields
This guide uses the complete custom request URL https://bettertoken.ai/v1/chat/completions in full-URL mode. The official Chinese documentation describes a Full URL switch; use it only if your client provides that control.

