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

# 安装技能

> 为已认证用户安装一个市场技能。

从市场安装一个技能。安装完成后，该技能会在每次补全请求中自动加载。

## 认证

需要 Bearer 令牌。参见[认证](/api-reference/authentication)。

## 请求体

<ParamField body="skillId" type="string" required>
  要安装的技能的 UUID。
</ParamField>

## 请求示例

<CodeGroup>
  ```bash curl theme={null}
  curl -X POST https://www.hitheo.ai/api/v1/skills \
    -H "Authorization: Bearer $THEO_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"skillId": "skill_abc123"}'
  ```

  ```typescript SDK theme={null}
  await theo.installSkill("skill_abc123");
  ```
</CodeGroup>

## 响应（HTTP 201）

```json theme={null}
{ "installed": true }
```

## 卸载

要卸载一个技能，请发送带有相同请求体的 `DELETE` 请求：

```bash theme={null}
curl -X DELETE https://www.hitheo.ai/api/v1/skills \
  -H "Authorization: Bearer $THEO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"skillId": "skill_abc123"}'
```

## 错误

| 状态码 | 错误码 | 描述 |
| - | - | - |
| 400 | `validation_error` | `skillId` 格式无效（必须为 UUID） |
| 404 | `not_found` | 未找到该技能 |


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