> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gmicloud.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# TRAE

> Use GMI Cloud models inside TRAE by adding GMI as a custom model.

TRAE is ByteDance's AI-native IDE. Its Add Model window accepts any OpenAI-compatible or Anthropic-compatible endpoint, so you can point it at GMI Cloud and pick any model in the GMI catalog from TRAE's model picker. Chat, agent runs, and inline edits all route through GMI once the model is added.

## Prerequisites

* A GMI Cloud account at [console.gmicloud.ai](https://console.gmicloud.ai)
* [TRAE](https://www.trae.ai) installed
* About 5 minutes

## Step 1. Get your GMI API key

1. Sign in to [console.gmicloud.ai](https://console.gmicloud.ai).
2. Open **API Keys** → **Create API Key**.
3. Copy the key now, it won't be shown again.

## Step 2. Open TRAE's model settings

In TRAE, open **Settings → Models**. The model management panel lists TRAE's built-in models and any custom models you have added.

## Step 3. Add GMI Cloud as a custom model

1. Click **Add Model**.
2. In the Add Model window, select **Custom Model** instead of a preset provider.
3. Fill in the fields. Use the first table for most models and the second for Claude models.

**Most models** (GPT, Kimi, GLM, DeepSeek, Qwen, and other OpenAI-compatible models):

| Field | Value |
| - | - |
| **API Format** | `OpenAI Chat Completions` |
| **Custom Request URL** | `https://api.gmi-serving.com/v1` |
| **Full URL** | Off (TRAE appends `/chat/completions` for you) |
| **Model ID** | A GMI model ID, e.g. `openai/gpt-5.5` |
| **Display Name** | Optional. Defaults to the model ID. |
| **API Key** | Your GMI API key from Step 1 |

**Claude models**:

| Field | Value |
| - | - |
| **API Format** | `Anthropic Messages` |
| **Custom Request URL** | `https://api.gmi-serving.com` |
| **Full URL** | Off (TRAE appends `/v1/messages` for you) |
| **Model ID** | A GMI Claude model ID, e.g. `anthropic/claude-sonnet-4.6` |
| **Display Name** | Optional. Defaults to the model ID. |
| **API Key** | Your GMI API key from Step 1 |

4. Optional: expand **Advanced Settings**. Turn on **Image Input Support** if the model accepts images. Leave **Model Series** on Default. **Context Window** and **Tool Call Rounds** can stay empty, TRAE fills in its own defaults.
5. Click **Add Model**.

TRAE sends a test request to GMI before saving. If the key or model ID is wrong, the window shows the error GMI returned so you can fix it on the spot.

Repeat Step 3 for each model you want in the picker. GMI model IDs always carry the provider prefix, for example `zai-org/GLM-5.1-FP8`, `moonshotai/kimi-k2.7-code`, or `deepseek-ai/DeepSeek-V4-Pro`.

Browse model IDs in the [Text models catalog](/model-quickstarts/text/overview).

## Step 4. Use it

Click the model name in the lower-right corner of the chat input box and pick your GMI model. Send a quick prompt to confirm the connection:

```text theme={null}
Add input validation to the signup form
```

TRAE plans the change, edits files, and runs commands, with every model call routed through GMI Cloud.

## Recommended models for TRAE

Agentic coding leans on tool calling, so pick catalog models with function-calling support. A good starting set:

| Model ID | API Format | Best for |
| - | - | - |
| `anthropic/claude-sonnet-4.6` | Anthropic Messages | Multi-file refactors and architecture work |
| `openai/gpt-5.5` | OpenAI Chat Completions | General-purpose agent sessions |
| `moonshotai/kimi-k2.7-code` | OpenAI Chat Completions | Long agentic loops at lower cost |
| `zai-org/GLM-5.1-FP8` | OpenAI Chat Completions | Fast open-weight coding |
| `deepseek-ai/DeepSeek-V4-Pro` | OpenAI Chat Completions | Reasoning-heavy debugging |

Add each one as its own entry in Step 3, then switch between them from the picker per task.

## Tips

* **Bad model name.** If a request 404s, the model ID is wrong. GMI model IDs always include the provider prefix (e.g. `openai/gpt-5.5`, not `gpt-5.5`). Copy the ID exactly from the catalog page.
* **Wrong path.** A 404 with a correct model ID usually means the **Full URL** switch doesn't match the URL you entered. With the switch off, use the base URL from the table. With it on, enter the full path: `https://api.gmi-serving.com/v1/chat/completions` for OpenAI Chat Completions, or `https://api.gmi-serving.com/v1/messages` for Anthropic Messages.
* **401 Unauthorized.** The API Key field holds something other than a GMI key, or the key was revoked. Create a fresh one in the GMI console and paste it into the entry.
* **Claude returns 400 about temperature and top\_p.** The Claude model was added under `OpenAI Chat Completions`. Claude accepts only one of the two sampling settings, so add Claude models with the `Anthropic Messages` format instead.
* **One entry per model.** TRAE stores each custom model separately, so three GMI models means three passes through Step 3 with the same key.
* **Mixing providers.** TRAE's built-in models stay available alongside your GMI entries. Only the entries you added route to GMI.
* **Long agent runs.** If TRAE stops mid-task on a large refactor, raise **Tool Call Rounds** in Advanced Settings.

## Next steps

* Try [Cursor](/coding-tools/cursor), [Claude Code](/coding-tools/claude-code), or [Codex](/coding-tools/codex) with the same GMI account.
* TRAE docs: [Built-in models & custom models](https://docs.trae.ai/ide/models)
* Stuck? Email [support@gmicloud.ai](mailto:support@gmicloud.ai).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.