> ## 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.