主题
新增令牌
POST
https://az.gptplus5.com/api/token/
请求参数
Header 参数
| 参数名 | 类型 | 必需 | 说明 | 示例 |
|---|---|---|---|---|
content-type | string | 必需 | application/json | |
new-api-user | string | 必需 | 1 | |
Authorization | string | 可选 |
Body 参数 (application/json)
| 参数名 | 类型 | 必需 | 说明 |
|---|---|---|---|
name | string | 必需 | |
remain_quota | integer | 必需 | |
expired_time | integer | 必需 | 到期时间戳 单位秒 没有到期限制设置为-1 |
unlimited_quota | boolean | 必需 | |
model_limits_enabled | boolean | 必需 | |
model_limits | string | 必需 | 可用模型列表: 模型名字按,号分割 |
allow_ips | string | 必需 | 白名单IP列表: 按\n号分割 |
group | string | 必需 | 支持分组 按,号分割 |
请求示例
json
{
"remain_quota": 250000000000,
"expired_time": -1,
"unlimited_quota": false,
"model_limits_enabled": false,
"model_limits": "",
"group": "",
"mj_image_mode": "default",
"mj_custom_proxy": "",
"selected_groups": [],
"name": "令牌名字",
"allow_ips": ""
}cURL 示例
bash
curl --location --request POST 'https://az.gptplus5.com/api/token/' \
--header 'new-api-user: 1' \
--header 'Authorization;' \
--header 'content-type: application/json' \
--data-raw '{
"remain_quota": 250000000000,
"expired_time": -1,
"unlimited_quota": false,
"model_limits_enabled": false,
"model_limits": "",
"group": "",
"mj_image_mode": "default",
"mj_custom_proxy": "",
"selected_groups": [],
"name": "令牌名字",
"allow_ips": ""
}'返回响应
🟢200成功
响应示例
json
{}