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

# API Key 使用

> API Key 的来源、权限和安全建议。

API Key 用于调用 黑胡子AI便利店的公开 API。所有请求都通过 Bearer Token 认证。

## 权限来源

API Key 的能力来自所属分组：

* 可见模型列表。
* 可调用渠道。
* 是否允许图片生成。
* 是否允许 Claude Code Messages 调度。
* 速率和并发限制。

## 安全建议

* 不要把 API Key 写进前端代码或公开仓库。
* 服务端通过环境变量或密钥管理系统读取。
* 怀疑泄露时立即停用并重新生成。
* 为不同业务或客户使用不同 API Key，便于限流和追踪。
