AGTCloud API Docs
文档指南API Reference集成与资源更新与帮助
账户与用量API Key 管理

创建 API Key

创建 API Key,使用访问令牌鉴权。

使用个人资料页面生成的访问令牌,不是被管理的模型 API Key。凭证获取和完整操作流程见程序化管理 API Key。

配额换算关系为 remain_quota = 金额 * 500000。expired_time=-1 表示永不过期;remain_quota=-1 且 unlimited_quota=true 表示无限配额。

创建功能支持批量创建。当前页面的请求示例展示单个 Token 的字段配置。

model_limits 使用逗号分隔的模型 ID 字符串,不是数组。创建成功后可按名称搜索并读取配置;响应不保证直接返回新密钥。

POST/api/token/

创建新的 API Token,支持批量创建。模型限制、IP 限制、配额和过期时间可分别配置。

Authorization

userAccessToken
AuthorizationBearer <token>

在个人资料页面的安全区域创建访问令牌,使用 Bearer 认证;不要填写模型调用 API Key。

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json