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

# Trae

> Configure Trae AI code editor to use KiosAPI as the backend provider.

# Trae

[Trae](https://www.trae.ai/) is an AI-powered code editor by ByteDance. This guide shows you how to configure it to use KiosAPI instead of the default provider.

## Prerequisites

* [Download and install Trae](https://www.trae.ai/)
* A **KiosAPI API key** (starts with `sk-`)

## Configuration

### 1. Open Trae Settings

1. Launch Trae
2. Open Settings (`Ctrl + ,` on Windows / `Cmd + ,` on macOS)
3. Search for **AI Provider** or navigate to **Settings → AI Settings**

### 2. Configure Custom Provider

Set the following values in the custom provider configuration:

| Field | Value |
| - | - |
| **API Base URL** | `https://kiosapi.com/v1` |
| **API Key** | `sk-xxx` |
| **Model** | `gpt-5.5` or any model available on KiosAPI |

> [!NOTE]
>
> Trae supports OpenAI-compatible providers. KiosAPI is fully OpenAI-compatible, so it works as a drop-in replacement.

### 3. Set environment variables (alternative)

You can also set environment variables if Trae reads them from the shell:

**Windows (PowerShell):**

```powershell theme={null}
setx OPENAI_API_KEY "sk-xxx"
setx OPENAI_BASE_URL "https://kiosapi.com/v1"
```

**macOS / Linux:**

Add to `~/.bashrc` or `~/.zshrc`:

```bash theme={null}
export OPENAI_API_KEY="sk-xxx"
export OPENAI_BASE_URL="https://kiosapi.com/v1"
```

### 4. Select the custom provider

In the Trae chat panel or inline completion settings, select your custom provider as the active AI backend.

## Usage

Once configured, you can use Trae's AI features (chat, inline completions, code generation) with KiosAPI as the backend.

> [!TIP]
>
> For best results with coding tasks, use models like `gpt-5.5`, `claude-sonnet-4-6`, or `deepseek-chat`. Check the [models list](https://docs.kiosapi.com/api-reference/models/list-models.md) for all available options.

## Troubleshooting

### AI features not working

* Verify the API key is correct and starts with `sk-`
* Ensure the base URL is `https://kiosapi.com/v1` (with `/v1`)
* Restart Trae after changing settings

### Model not available

* Check that the model name is supported on KiosAPI
* Verify your token group includes the desired model

## Need Help?

* [KiosAPI Dashboard](https://kiosapi.com)
* [Available Models](https://docs.kiosapi.com/api-reference/models/list-models.md)


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