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

# API 密钥获取与管理

> 在 **Console** 创建并管理 **API key**，用于调用 YeLIn AI 的 OpenAI 兼容接口。

<Info>
  你在 **Console** 创建并复制 **API key** 后，就可以用 OpenAI 兼容接口调用 200+ 模型。
</Info>

## 获取默认 API key

1. 打开 **Console**：`https://yelinai.com/console`
2. 进入 **API keys**（或 **令牌**）页面。
3. 找到默认 key，点击 **复制**。

<Warning>
  你只应在服务端保存 key。
  不要把 key 提交到 Git 仓库，也不要写进前端代码。
</Warning>

## 创建新的 API key

你可以按项目创建独立的 key，方便权限隔离与用量统计。

1. 在 **Console** 打开 **API keys**。
2. 点击 **创建**。
3. 设置备注（建议写项目名）。
4. 创建后立即复制并保存。

<Tip>
  如果你没有“限制可用模型”的强需求，建议不要设置白名单。
  这样你可以直接使用全站 200+ 模型。
</Tip>

## key 格式说明

* key 通常以 `sk-` 开头
* key 长度通常为 48–64 位字符
* 不要把 key 发到群里或截图分享

## 你可能还会用到

<CardGroup cols={2}>
  <Card title="API 手册" icon="book" href="/api-manual">
    查看鉴权方式、base URL 与请求示例。
  </Card>

  <Card title="对话补全" icon="message-circle" href="/api-reference/chat-completions">
    直接复制可运行的 Chat Completions 请求模板。
  </Card>
</CardGroup>
