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

# Trae

> 在 Trae 中使用 S2 模型进行 AI 编程

## 安装 Trae

<Steps>
  <Step title="下载并安装">
    访问 [Trae 官网](https://www.trae.cn/) 下载并安装。
  </Step>

  <Step title="完成初始设置">
    Trae 首次启动时按指引完成初始设置。
  </Step>

  <Step title="登录 Trae">
    使用已有账号登录。
  </Step>
</Steps>

## 使用自定义模型接入 SenseAudio

Trae 支持通过 **API Key** 接入自定义模型。

<Steps>
  <Step title="打开设置">
    在 AI 对话框右上角点击 **设置** 图标。
  </Step>

  <Step title="选择模型页签">
    <img src="https://mintcdn.com/sa-5efeb1e4/TA-q4lj8eSdDrErc/images/token-plan/trae01.png?fit=max&auto=format&n=TA-q4lj8eSdDrErc&q=85&s=b743a5571c9a5ed1fde27958ee2a97ff" width="80%" data-path="images/token-plan/trae01.png" />
  </Step>

  <Step title="添加模型">
    <img src="https://mintcdn.com/sa-5efeb1e4/TA-q4lj8eSdDrErc/images/token-plan/trae02.png?fit=max&auto=format&n=TA-q4lj8eSdDrErc&q=85&s=cb7ca21105cfdf3fc1c7b7cfd8caf94b" width="80%" data-path="images/token-plan/trae02.png" />
  </Step>

  <Step title="填写配置信息">
    | 配置项         | 值                                                                 |
    | ----------- | ----------------------------------------------------------------- |
    | **服务商**     | `openai`                                                          |
    | **模型**      | `自定义模型`                                                           |
    | **模型ID**    | `senseaudio-s2`                                                   |
    | **API秘钥**   | `您的 Token Plan API Key（详见 [快速接入](/guides/token-plan/quickstart)）` |
    | **自定义请求地址** | `https://api.senseaudio.cn/v1/chat/completions`                   |

    <img src="https://mintcdn.com/sa-5efeb1e4/TA-q4lj8eSdDrErc/images/token-plan/trae03.png?fit=max&auto=format&n=TA-q4lj8eSdDrErc&q=85&s=ecc19ec8072f9eccf6c921f8c874d446" width="80%" data-path="images/token-plan/trae03.png" />
  </Step>

  <Step title="选择SenseAudio模型">
    <img src="https://mintcdn.com/sa-5efeb1e4/TA-q4lj8eSdDrErc/images/token-plan/trae04.png?fit=max&auto=format&n=TA-q4lj8eSdDrErc&q=85&s=8477b40511a065c4772c94fb9c2f1dfe" width="80%" data-path="images/token-plan/trae04.png" />
  </Step>

  <Step title="使用模型">
    <img src="https://mintcdn.com/sa-5efeb1e4/TA-q4lj8eSdDrErc/images/token-plan/trae05.png?fit=max&auto=format&n=TA-q4lj8eSdDrErc&q=85&s=e837e8fd9fee186021d894e0a3f30950" width="80%" data-path="images/token-plan/trae05.png" />
  </Step>
</Steps>

## 相关资源

<CardGroup cols={2}>
  <Card title="Claude Code 接入" icon="sparkles" href="/guides/token-plan/claude-code" />

  <Card title="S2 使用技巧" icon="lightbulb" href="/guides/token-plan/best-practices" />

  <Card title="常见问题" icon="circle-question" href="/guides/token-plan/faq">
    订阅、限额、切换、开票等问题解答。
  </Card>
</CardGroup>
