Updated on 2026-11-03 GMT+08:00

TRAE

TRAE is an AI-native integrated development environment (IDE) that deeply integrates large AI models into the software development workflow, enabling end-to-end automation from code generation to project deployment. TRAE supports MaaS model APIs, giving you access to a wider range of models. This section describes how to configure MaaS model APIs in TRAE.

Prerequisites

Billing

When using the MaaS model service, you are charged based on the number of tokens used. For details, see MaaS Text Generation Models.

Constraints

This function is only supported in the CN-Hong Kong region.

Step 1: Install TRAE

Download the TRAE version for your operating system from the TRAE official website and install it.

Step 2: Access MaaS Model APIs

  1. Click the login entry for a Personal User, click the username in the lower left corner, and click Settings.

    Figure 1 Settings

  2. On the Settings page, choose Models from the navigation pane. On the Model Management page, click Add Model.
  3. On the Add Model page, click Custom Model. The Custom Model page is displayed.

    Figure 2 Custom model page

  4. On the Custom Model page, set the parameters.

    Table 1 Custom model configuration

    Parameter

    Description

    Example

    API Format

    (Mandatory) Select one of the following values:

    • OpenAI Chat Completions
    • Anthropic Messages

    OpenAI Chat Completions

    Custom Request URL

    (Mandatory) Enter the complete URL:

    When the full URL switch is turned off, you do not need to include /chat/completions (OpenAI) or /v1/messages (Anthropic) in the URL.

    • For the OpenAI Chat Completions format, enter the following complete URL:
      • https://api-ap-southeast-1.modelarts-maas.com/v2/chat/completions
      • https://api-ap-southeast-1.modelarts-maas.com/openai/v1/chat/completions
    • For the Anthropic Messages format, enter the following complete URL:

      https://api-ap-southeast-1.modelarts-maas.com/anthropic/v1/messages

    https://api-ap-southeast-1.modelarts-maas.com/v2

    Model ID

    (Mandatory) Enter the model ID.

    Obtain the value from Model Parameter in the model list.

    deepseek-v4.1-flash

    API Key

    (Mandatory) Enter an API key.

    You can use an existing API key. If no API key is available, obtain an API key.

    gA4ocs*****Tc-Kz4AQ

    Display Name

    (Optional) Enter a display name for the model.

    maas-deepseek-v4.1-flash

    Advanced Settings

    (Optional) Set the thinking mode, hyperparameters, and context window.

    -

    Figure 3 Configuration example

  5. Click Add Model and test the connection. The model is added if the test succeeds.

Step 3: Use TRAE

  1. In the navigation pane of the TRAE home page, choose New task. Then select the model configured in Step 2: Access MaaS Model APIs in the Custom Models area in the lower part of the dialog box.

    Figure 4 Selecting a model

  2. Start a dialogue in the dialog box to experience the model.

    Figure 5 Example conversation

  3. (Optional) In the lower part of the model selection dialog box, click Add Model to add more models.

Common Errors

Table 2 Troubleshooting common errors

Error

Cause

Solution

404 The API does not exist

Incomplete base URL

  • When the complete URL switch is turned on, add the suffix /chat/completions (OpenAI) or /v1/messages (Anthropic).
  • When the complete URL switch is turned off, you do not need to add the suffix /chat/completions (OpenAI) or /v1/messages (Anthropic).

Invalid authorization header

Incorrect or incomplete API key

Check whether the API key is completely copied and whether there are spaces.

Network error

Unreachable address or incorrect port

Check whether the firewall and intranet address are accessible.

Invalid model

Misspelled model ID

Check for inconsistent capitalization and extra spaces.

Invalid request because you do not have access to it.

The model is not enabled in MaaS.

Enable the corresponding built-in service on the MaaS console.