Theme
Create Token
POST
https://www.kkiai.com/api/token/
Request Parameters
Header Parameters
| Parameter Name | Type | Required | Description | Example |
|---|---|---|---|---|
content-type | string | Required | application/json | |
new-api-user | string | Required | 1 | |
Authorization | string | Optional |
Body Parameters (application/json)
| Parameter Name | Type | Required | Description |
|---|---|---|---|
name | string | Required | |
remain_quota | integer | Required | |
expired_time | integer | Required | Expiration timestamp in seconds. Set to -1 for no expiration limit |
unlimited_quota | boolean | Required | |
model_limits_enabled | boolean | Required | |
model_limits | string | Required | Available model list: model names separated by commas |
allow_ips | string | Required | Whitelist IP list: separated by \n |
group | string | Required | Support grouping: separated by commas |
Request Example
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": "token name",
"allow_ips": ""
}cURL Example
bash
curl --location --request POST 'https://www.kkiai.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": "token name",
"allow_ips": ""
}'Response
🟢 200 Success
Response Example
json
{}