Skip to main content

Trae

Use Alibaba Cloud Model Studio models in Trae.

Quick Start

Sign in and configure it as follows.
  1. 1

    Get an API Key

    Get the API Key for your billing plan:
  2. 2

    Configure the model

    In Trae, go to Settings > Models and click Add Model.
    • Token Plan
    • Pay-as-you-go
    • Coding Plan
    Select Custom Model and enter the following:
    ParameterValue
    API formatOpenAI-compatible
    Request URLhttps://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1
    Model IDEnter a text generation model supported by Personal Edition or Team Edition
    API keyThe Token Plan API Key from the previous step
  3. 3

    Verify

    Select the configured model from the model list in the lower-right corner of the chat box and send a message. A reply confirms the configuration.

Error Codes

If you encounter errors during configuration, refer to the FAQ documentation for your billing plan:

FAQ

The pay-as-you-go setup remains the same: use your general Model Studio API key and Base URL. After you purchase a savings plan, it takes effect automatically and eligible usage is deducted automatically. See Savings plans.
The API Key does not match the selected plan, or the subscription has expired. Make sure the API Key type matches the selected plan, then get and enter the correct key again.
The model ID does not match the selected plan. Select a text generation model supported by the plan.