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

# API Key 管理

> 创建并管理模型调用凭证，配置模型范围与额度，使用映射和回退等高级功能，并安全完成停用、替换与删除。

API Key 用于调用模型。建议按应用或用途分别创建，方便查看用量，并在需要时单独停用。

<h2 id="create-key">
  创建 Key
</h2>

1. 打开控制台的 **API 密钥**，确认当前账户和工作区。
2. 选择创建，填写便于识别的名称。
3. 按需设置模型范围、额度和到期时间，核对后保存。
4. 复制 Key，保存在环境变量或密钥管理工具中，按[快速开始](/cn/quick-start)调用。

如创建窗口提示明文仅显示一次，请在关闭前保存。不要把完整 Key 放入前端代码、公开仓库或支持工单。

<h2 id="advanced-settings">
  高级设置
</h2>

| 需求 | 对应功能 |
| - | - |
| 保留应用中的模型名称，改用另一模型 | [模型名映射](/cn/api/Model-Mapping-Fallback) |
| 主模型符合回退条件时使用备用模型 | [错误时回退](/cn/api/Model-Mapping-Fallback) |
| 修复结构化输出中的部分 JSON 格式错误 | [结构化输出修复](/cn/api/structured-output-repair) |

保存后用真实请求验证设置。配置不会扩展目标模型本身不具备的输入、输出或工具能力。

<h2 id="manage-key">
  停用、替换与删除
</h2>

* **停用**：暂时停止该 Key 的调用。恢复前确认它仍有效且未到期。
* **替换**：先创建新 Key，更新应用并验证，再停用旧 Key。
* **删除**：确认受影响的应用已切换凭证，再完成删除。

企业工作区还有[成员 Key 与系统 Key](/cn/enterprise/keys)，其归属、管理权限和到期规则请查看对应指南。

<h2 id="troubleshooting">
  调用被限制时
</h2>

检查 Key 状态、有效期、模型范围、剩余额度和账户余额。企业调用还受[工作区预算](/cn/enterprise/budgets)限制。到[请求日志](/cn/console/request-logs)查看错误与 Tid，避免反复重试已失效的凭证。

管理账户资源的凭证请使用[管理密钥](/cn/platform/management-keys)。

更新时间：2026-10-13


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