Docs API keys /api/token/
API reference

Create token

Create an API token. On success, data is the full key string (sk-...); store it immediately.

POST/api/token/

Body Parametersapplication/json

allow_ips string

IP allowlist

expired_time integer

Expiry unix seconds; `-1` never expires

group string

User group

mj_custom_proxy string

Midjourney custom proxy

mj_image_mode string

Midjourney image mode

model_limits string

Model limit configuration

model_limits_enabled boolean

Whether model limits are enabled

name* string

Name

remain_quota integer

Remaining quota

routing_priority string

Routing priority

unlimited_quota boolean

Whether quota is unlimited

Responses

200 Success; data is the sk- key string application/json
response-200
allOf
ApiEnvelope object
properties
data

Data payload (often Base64 or a structured object)

message string

Message

success boolean

Whether the call succeeded

object object
properties
data string

Data payload (often Base64 or a structured object)

400 Bad request or validation failed application/json
response-400 object
properties
error* object
401 Missing or invalid API Key application/json
response-401 object
Request Body Example
1{
2"allow_ips": "",
3"expired_time": -1,
4"group": "",
5"mj_custom_proxy": "",
6"mj_image_mode": "default",
7"model_limits": "",
8"model_limits_enabled": false,
9"name": "my-token",
10"remain_quota": 500000,
11"routing_priority": "",
12"unlimited_quota": false
13}
Code Sample cURL
1curl -X POST "https://api.digislash.com/api/token/" \
2-H "Content-Type: application/json" \
3-d '{
4"allow_ips": "",
5"expired_time": -1,
6"group": "",
7"mj_custom_proxy": "",
8"mj_image_mode": "default",
9"model_limits": "",
10"model_limits_enabled": false,
11"name": "my-token",
12"remain_quota": 500000,
13"routing_priority": "",
14"unlimited_quota": false
15}'
Response
1▼{
2"data": "string",
3"message": "string",
4"success": true
5}