Skip to Content

创建一个新的 API KEY

请求参数

请求头(headers)

stringrequired

请求身份认证。接口使用 CaMeL AI Manage Key 进行身份认证。

string

请求内容类型。此参数必须设置为 application/json。

请求体(Request Body)

namestringrequired

新 Key 的名称。

expired_timeinteger

过期时间。存储格式为 UNIX 时间戳,-1 表示永不过期。

unlimited_quotaboolen

是否限额。

remain_quotainteger

remain_quota 为:期望限额*500000

modelstext

限制模型。

subnettext

限制 IP

响应参数

dataobject

用户新建 Key 相关信息(通常包含 id、name 等)。

idinteger

Key ID。

user_idinteger

用户 ID

statusinteger

Key 状态。0 为未启用,1 为启用。

namestring

Key 名称。

created_timeinteger

Key 创建时间,保存格式为 UNIX 时间戳。

accessed_timeinteger

Key 获取时间,保存格式为 UNIX 时间戳。

expired_timestring

Key 过期时间,-1 表示永不过期。

remain_quotastring

限额余量,-1 表示无限额。

unlimited_quotaboolean

是否限额。

used_quotainteger

已使用额度为:used_quota / 500000

modelstext

限制当前 Key 使用的模型。

subnettext

IP 限制。

messagestring

请求失败的详细信息。请求成功时不会返回此参数。

successboolean

是否成功