API Docs
Client Setup

TRAE API Setup

Add a custom model — note the base address must not include /v1.

Prerequisites

  • TRAE installed and signed in.
  • A topped-up account and an API key; see Console & top-up.

Setup steps

  1. Open TRAE Settings → Models → Add custom model.

  2. Choose OpenAI Chat Completion as the API format.

  3. Keep the Full URL switch off and enter the base address:

    https://api.unioapi.com
  4. Fill in a model ID (e.g. gpt-5.6-sol; full list: GET /v1/models) and your API key.

  5. TRAE validates the key on save; then pick the model and send a message to verify.

Key detail: path concatenation

With the Full URL switch off, TRAE appends the path automatically based on the API format:

  • OpenAI format appends /v1/chat/completions;
  • Anthropic format appends /v1/messages.

So the base address must not contain /v1 or a trailing slash, otherwise the duplicated path returns 404. If you prefer to control the full path yourself, turn the Full URL switch on and enter https://api.unioapi.com/v1/chat/completions.

The custom model form in TRAE
public/docs/screenshots/trae-custom-model.png · 1600×1000

Troubleshooting

SymptomCheck
404 / Invalid URLThe base address contains /v1 or ends with a slash; fix as above.
Validation failedConfirm the API format matches the model's protocol and the model ID matches GET /v1/models.
500 internal errorTry switching the API format (do not pick Anthropic format for OpenAI-protocol models).

Next steps