Midjourney / MJ

Planned

Use Midjourney-compatible submit, fetch, image, and task helper routes where configured.

POST /mj/submit/imagine

Submits a Midjourney imagine task. The example uses the selected latest-model documentation example mj_imagine and includes all fields from the Midjourney request DTO.

MJ imagine
curl https://www.token168.cc/mj/submit/imagine \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN168_API_KEY" \
  -d '{
    "prompt": "A clean product render --v 8 --ar 16:9",
    "customId": "",
    "botType": "MID_JOURNEY",
    "notifyHook": "",
    "action": "IMAGINE",
    "index": 1,
    "state": "client-trace-123",
    "taskId": "",
    "base64Array": [],
    "content": "",
    "maskBase64": ""
  }'

POST /mj/submit/change

Submits an upscale or variation action against an existing MJ task.

MJ change
curl https://www.token168.cc/mj/submit/change \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN168_API_KEY" \
  -d '{
    "taskId": "mj_task_123",
    "action": "UPSCALE",
    "index": 1,
    "customId": "MJ::JOB::upsample::1",
    "state": "client-trace-123",
    "content": ""
  }'

POST /mj/submit/action and related submit routes

Action, shorten, modal, simple-change, describe, blend, edits, video, and upload-discord-images routes share the same Midjourney request envelope and set the action from path or body.

MJ submit route examples
curl https://www.token168.cc/mj/submit/action \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN168_API_KEY" \
  -d '{
    "taskId": "mj_task_123",
    "action": "VARIATION",
    "index": 1,
    "customId": "MJ::JOB::variation::1",
    "state": "client-trace-123",
    "content": ""
  }'


curl https://www.token168.cc/mj/submit/shorten \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN168_API_KEY" \
  -d '{
    "prompt": "A long Midjourney prompt to shorten --v 8",
    "state": "client-trace-123",
    "botType": "MID_JOURNEY"
  }'


curl https://www.token168.cc/mj/submit/modal \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN168_API_KEY" \
  -d '{
    "taskId": "mj_task_123",
    "customId": "MJ::JOB::modal",
    "prompt": "Adjust the modal prompt",
    "maskBase64": "",
    "state": "client-trace-123"
  }'


curl https://www.token168.cc/mj/submit/simple-change \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN168_API_KEY" \
  -d '{
    "taskId": "mj_task_123",
    "action": "UPSCALE",
    "index": 2,
    "state": "client-trace-123"
  }'


curl https://www.token168.cc/mj/submit/describe \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN168_API_KEY" \
  -d '{
    "base64Array": ["data:image/png;base64,..."],
    "state": "client-trace-123",
    "botType": "MID_JOURNEY"
  }'


curl https://www.token168.cc/mj/submit/blend \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN168_API_KEY" \
  -d '{
    "base64Array": ["data:image/png;base64,...", "data:image/png;base64,..."],
    "dimensions": "SQUARE",
    "state": "client-trace-123",
    "botType": "MID_JOURNEY"
  }'


curl https://www.token168.cc/mj/submit/edits \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN168_API_KEY" \
  -d '{
    "prompt": "Replace the background with a clean studio wall",
    "taskId": "mj_task_123",
    "maskBase64": "data:image/png;base64,...",
    "state": "client-trace-123",
    "botType": "MID_JOURNEY"
  }'


curl https://www.token168.cc/mj/submit/video \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN168_API_KEY" \
  -d '{
    "taskId": "mj_task_123",
    "prompt": "Animate this frame with a slow camera move",
    "image": "https://example.com/frame.png",
    "state": "client-trace-123",
    "botType": "MID_JOURNEY"
  }'


curl https://www.token168.cc/mj/submit/upload-discord-images \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN168_API_KEY" \
  -d '{
    "base64Array": ["data:image/png;base64,..."],
    "state": "client-trace-123",
    "botType": "MID_JOURNEY"
  }'
MethodPathStatus
POST/mj/submit/actionPlanned / deployment gated
POST/mj/submit/shortenPlanned / deployment gated
POST/mj/submit/modalPlanned / deployment gated
POST/mj/submit/changePlanned / deployment gated
POST/mj/submit/simple-changePlanned / deployment gated
POST/mj/submit/describePlanned / deployment gated
POST/mj/submit/blendPlanned / deployment gated
POST/mj/submit/editsPlanned / deployment gated
POST/mj/submit/videoPlanned / deployment gated
POST/mj/submit/upload-discord-imagesPlanned / deployment gated

GET /mj/task/{id}/fetch

Fetches a single MJ task by task ID for the current API key user.

MJ fetch
curl https://www.token168.cc/mj/task/mj_task_123/fetch \
  -H "Authorization: Bearer $TOKEN168_API_KEY"

POST /mj/task/list-by-condition

Lists MJ tasks by condition. Use this for dashboard-style polling or search when provider access is configured.

MJ list by condition
curl https://www.token168.cc/mj/task/list-by-condition \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN168_API_KEY" \
  -d '{
    "mj_id": "mj_task_123",
    "action": "IMAGINE",
    "status": "SUCCESS"
  }'

GET /mj/task/{id}/image-seed and GET /mj/image/{id}

Image seed and image proxy helper routes are available in the MJ route group. They use path parameters and the same API key authorization.

MJ image helpers
curl https://www.token168.cc/mj/task/mj_task_123/image-seed \
  -H "Authorization: Bearer $TOKEN168_API_KEY"


curl https://www.token168.cc/mj/image/image_123 \
  -H "Authorization: Bearer $TOKEN168_API_KEY" \
  --output mj-image.png
MethodPathStatus
GET/mj/task/{id}/image-seedPlanned / deployment gated
GET/mj/image/{id}Planned / deployment gated

POST /mj/insight-face/swap

Submits an InsightFace swap helper request through the MJ route group when the deployment enables that capability.

MJ insight face swap
curl https://www.token168.cc/mj/insight-face/swap \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $TOKEN168_API_KEY" \
  -d '{
    "sourceBase64": "data:image/png;base64,...",
    "targetBase64": "data:image/png;base64,...",
    "state": "client-trace-123"
  }'