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

# 獲取你的 API 密鑰

> 創建 Theo API 密鑰以開始發起請求。

## 創建賬戶

1. 前往 [api.hitheo.ai](https://api.hitheo.ai)
2. 使用郵箱或社交賬號登錄註冊
3. 你將進入 API 控制台

## 生成密鑰

1. 在側邊欄中導航到 **API Keys**
2. 點擊 **Create Key**
3. 為你的密鑰起一個描述性的名稱（例如 "Production"、"Development"）
4. 立即複製該密鑰 —— 它不會再次顯示

你的密鑰格式如下：

```
theo_sk_a1b2c3d4e5f6...
```

<Warning>
  請安全地保存你的 API 密鑰。切勿將其提交到源代碼倉庫，也不要在客戶端代碼中暴露它。請改用環境變量來存儲。
</Warning>

## 設置環境變量

```bash theme={null}
export THEO_API_KEY=theo_sk_a1b2c3d4e5f6...
```

或將其添加到你的 `.env` 文件中：

```env theme={null}
THEO_API_KEY=theo_sk_a1b2c3d4e5f6...
```

## 驗證是否生效

```bash theme={null}
curl https://www.hitheo.ai/api/v1/health
```

該端點是公開的（無需身份驗證），會返回系統狀態。若要專門驗證你的密鑰，可執行：

```bash theme={null}
curl https://www.hitheo.ai/api/v1/models \
  -H "Authorization: Bearer $THEO_API_KEY"
```

你應該會收到一份可用 Theo 引擎模型的列表。

## 密鑰格式

所有 API 密鑰均使用 `theo_sk_` 前綴。這些密鑰均為生產密鑰 —— 所有用量都將從你的信用額度餘額中計費。

## 下一步

<CardGroup cols={2}>
  <Card title="發起你的第一次調用" icon="terminal" href="/quickstart/first-completion">
    使用 curl 發送你的第一個補全請求。
  </Card>

  <Card title="安裝 SDK" icon="package" href="/quickstart/install-sdk">
    設置 TypeScript SDK 以獲得更好的開發體驗。
  </Card>
</CardGroup>


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