TRAE custom API setup
Configure TRAE with UniRoute using Anthropic Messages, a custom model and manual model selection.
TRAE · pay-as-you-go API
Add UniRoute as a custom Claude model in the international TRAE app from trae.ai. Match the API format to the URL, then select your model in chat.
Best for: Developers using the international TRAE IDE or Agent window.
Quick setup
Sign in to create a key and fill it in automatically Sign in
Copy each value into its matching client field.
API Format
Anthropic MessagesCustom Request URL
https://api.uniroute.appAPI Key
YOUR_UNIROUTE_API_KEYModel ID
claude-sonnet-5-5Display Name
UniRoute SonnetFull URL
OffSetup steps
1. Add a custom model
Open Settings → Models, click Add Model, then choose Custom Model.
2. Set the protocol and address
Choose Anthropic Messages in API Format. Turn Full URL off and paste https://api.uniroute.app into Custom Request URL. TRAE appends /v1/messages.
3. Enter the model and key
Paste claude-sonnet-5-5 into Model ID, your key into API Key, and UniRoute Sonnet into Display Name. Keep Advanced Settings defaults, including Model Series → Default, then click Add Model.
4. Select the custom model
Open the model menu at the bottom-right of chat, turn Auto Mode off, and select UniRoute Sonnet.
Auto Mode selects built-in models; keep it off when using your custom model.
What these fields do
| Field | Purpose |
|---|---|
| API Format | Anthropic Messages selects Claude’s Messages protocol. |
| Custom Request URL / Full URL | With Full URL off, enter the root URL and TRAE adds the protocol path. |
| Model ID | The exact API model identifier. |
| API Key | Your UniRoute request credential. |
| Display Name | The local menu label; it does not change the requested model. |
| Advanced Settings | Keep the model-series, context, tool-round and sampling defaults for the initial text setup. |
Choose a model
Confirm the connection
Send a short test: Reply only: hello
Open usage logs to review the model, request status and charge. The test is a real, billed API request.
Use a new chat with UniRoute Sonnet selected, read the streamed reply, and check the matching model in usage logs.
Switch back / restore a backup
Choose your previous model in chat. To remove this connection, delete only the UniRoute custom model from Settings → Models.
Not installed yet?
Download the international TRAE app from trae.ai, install it, then open Settings → Models.
FAQ
Can I use the complete Messages endpoint?
Yes. Turn Full URL on and enter https://api.uniroute.app/v1/messages in Custom Request URL.
Can I add an OpenAI-compatible model?
Add a separate custom model with API Format set to OpenAI Chat Completions, Full URL off, and Custom Request URL set to https://api.uniroute.app/v1. Use deepseek-v4-flash as Model ID.
Where do I change the displayed model name?
Edit Display Name in Settings → Models. Model ID remains the exact identifier sent to UniRoute.
Troubleshooting
Chat still uses a built-in model
Auto Mode is enabled or the custom model is not selected.
Turn Auto Mode off and select UniRoute Sonnet.
404 / incorrect endpoint
Full URL and Custom Request URL do not match.
Use the root https://api.uniroute.app with Full URL off for Anthropic Messages.
401 / failed to add model
The provider check could not authenticate the key.
Paste a complete active UniRoute key and check its permissions and wallet in the console.
Custom model missing from the menu
The model is disabled in Models.
Open Settings → Models, enable the custom model, then select it in chat.
References
TRAE custom model settings · TRAE Auto Mode
Related links
All integrations · Manage API keys · Protocols and addresses · Model prices · Usage records
