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

# API Token

> 在 MeiGen 账户后台创建和管理 API Token

前往 [meigen.ai → 设置 → API Keys](https://www.meigen.ai) 创建和撤销 Token。每个账号最多同时拥有 5 个活跃 Token。

Token 格式：`meigen_sk_` 后接 32 个字符。完整值仅在创建时显示一次，请立即复制。

在任何需要认证的端点将 Token 作为 Bearer 凭证传入：

```bash theme={null}
curl -X POST https://www.meigen.ai/api/generate/v2 \
  -H "Authorization: Bearer meigen_sk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "a minimalist logo"}'
```

<Note>
  Token 管理本身（`POST` / `GET` / `DELETE /api/tokens`）使用登录后的浏览器 session 鉴权，而非 API Key —— API Key 无法创建或撤销 Token，请在账户设置中管理。
</Note>

<Warning>
  **API Token 只能消耗购买积分。** 每日免费积分不可用于 API 调用。
</Warning>
