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

# API 密钥

> 对 Kazzle API 的编程访问。

API 密钥让你能够以编程方式访问 Kazzle API - 从脚本、CI 管道或外部工具。

## 创建 API 密钥

转到**设置 > API 密钥**，点击**创建密钥**。为其命名并立即复制密钥 - 之后将不再显示。

## 使用密钥

在 `Authorization` 请求头中传递 API 密钥：

```
Authorization: Bearer kzl_your_api_key_here
```

或将其设置为 `KAZZLE_API_KEY` 环境变量以供 Kazzle CLI 使用：

```bash theme={"theme":"material-theme-darker"}
export KAZZLE_API_KEY=kzl_your_api_key_here
kazzle secrets list --collection=my-app
```

## 作用域

API 密钥的作用域限于创建它们的空间。它们拥有创建者的相同权限。

## 撤销

随时可从**设置 > API 密钥**删除 API 密钥。撤销立即生效 - 任何使用该密钥的请求都将失败。

## 另见

* [AI API](/platform/ai-api) - 通用聊天、图像、语音、转录和视频端点
* [API 参考](/api-reference) - 完整端点文档
* [Vault](/work/vault) - 管理密钥和凭证
