Trae custom model setup

Trae supports custom models. Fill a few fields and use Claude 5.5 and GPT-6 in Trae’s agent.

Updated 2026-11-16

1. Get an API key

Sign up in the TokenMilo console, top up and create a key under API Keys.

2. Add a custom model

  1. Open Settings → Models and click Add Model.
  2. Choose Custom Model.
  3. Fill in the table below (keep Full URL off).
  4. In Advanced Settings set the context window to 200000 input / 32000 output and enable image input.
  5. Click Add Model; Trae runs a test call.
FieldClaude (recommended)GPT
API FormatAnthropic MessagesOpenAI Chat Completions
Custom Request URLhttps://api.tokenmilo.com (no /v1)https://api.tokenmilo.com/v1 (with /v1)
Model IDclaude-sonnet-5-5gpt-6.1-sol
API Keysk-your-keysk-your-key
Model SeriesDefaultDefault

Repeat for more models such as claude-opus-5-5. See the model list.

3. Check it works

Select the new model in Trae’s chat, ask something, then check Usage Logs in the console.

FAQ

Which Model Series should I pick?

On personal plans the Claude series preset is enterprise-only, so choose Default. Then raise the context window manually in Advanced Settings.

Validation fails when adding the model

Usually the URL. With Full URL off, Anthropic format uses https://api.tokenmilo.com (no /v1) and OpenAI format uses https://api.tokenmilo.com/v1 (with /v1). Also check the model ID.

Why Anthropic Messages for Claude?

The native Anthropic format gives the best tool-calling and prompt-caching behaviour for Claude in agent mode.

Related guides

Need an API key?

Sign up at TokenMilo, top up, and create a key in the console in under a minute.

Get API key See all models