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
- You have signed up for a Huawei Cloud account. For details, see Signing Up for a Huawei Cloud Account.
- You have subscribed to a built-in service or created an endpoint. For details, see Subscribing to a Built-in Service and Creating an Endpoint.
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
- Click the login entry for a Personal User, click the username in the lower left corner, and click Settings. Figure 1 Settings
- On the Settings page, choose from the navigation pane. On the Model Management page, click Add Model.
- On the Add Model page, click Custom Model. The Custom Model page is displayed. Figure 2 Custom model page
- 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
- Click Add Model and test the connection. The model is added if the test succeeds.
Step 3: Use TRAE
- In the navigation pane of the TRAE home page, choose . 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
- Start a dialogue in the dialog box to experience the model. Figure 5 Example conversation
- (Optional) In the lower part of the model selection dialog box, click Add Model to add more models.

Common Errors
| Error | Cause | Solution |
|---|---|---|
| 404 The API does not exist | Incomplete base URL |
|
| 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. |
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot