Create token
Endpoint: POST https://4zapi.com/api/token/
Create an API token. On success, data is the full key string (sk-...); store it immediately.
Parameters
New-Api-User(header, string, required): Current user ID; must match the authenticated identity
Request body (application/json)
name(string, required): Nameallow_ips(string): IP allowlistexpired_time(integer): Expiry unix seconds; `-1` never expiresgroup(string): User groupmj_custom_proxy(string): Midjourney custom proxymj_image_mode(string): Midjourney image modemodel_limits(string): Model limit configurationmodel_limits_enabled(boolean): Whether model limits are enabledremain_quota(integer): Remaining quotarouting_priority(string): Routing priorityunlimited_quota(boolean): Whether quota is unlimited
Request example
{
"allow_ips": "",
"expired_time": -1,
"group": "",
"mj_custom_proxy": "",
"mj_image_mode": "default",
"model_limits": "",
"model_limits_enabled": false,
"name": "my-token",
"remain_quota": 500000,
"routing_priority": "",
"unlimited_quota": false
}