Skip to main content

Execute Actions

Action - Upscale / Variation

POST /mj/submit/action
Execute follow-up actions on a completed Imagine task, such as Upscale, Variation, etc.

Request Parameters

ParameterTypeRequiredDescription
taskIdstringYesOriginal task ID
customIdstringYesThe customId of the action button, obtained from the task’s buttons field
notifyHookstringNoCallback URL
statestringNoCustom state

Request Example

cURL
curl -X POST https://crazyrouter.com/mj/submit/action \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "taskId": "task_1234567890",
    "customId": "MJ::JOB::upsample::1::abc123"
  }'

Response Example

{
  "code": 1,
  "description": "Submitted successfully",
  "result": "task_action_001",
  "properties": {}
}

Blend - Image Blending

POST /mj/submit/blend
Blend multiple images to generate a new image.

Request Parameters

ParameterTypeRequiredDescription
botTypestringNoMID_JOURNEY (default) or NIJI_JOURNEY
base64ArrayarrayYesArray of Base64-encoded images, 2-5 images
dimensionsstringNoOutput dimensions: PORTRAIT, SQUARE, LANDSCAPE
notifyHookstringNoCallback URL
statestringNoCustom state

Request Example

cURL
curl -X POST https://crazyrouter.com/mj/submit/blend \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "base64Array": [
      "data:image/png;base64,iVBORw0KGgo...",
      "data:image/png;base64,iVBORw0KGgo..."
    ],
    "dimensions": "SQUARE"
  }'

Response Example

{
  "code": 1,
  "description": "Submitted successfully",
  "result": "task_blend_001"
}

Describe - Image Description

POST /mj/submit/describe
Upload an image and let Midjourney generate corresponding prompt descriptions.

Request Parameters

ParameterTypeRequiredDescription
botTypestringNoMID_JOURNEY (default) or NIJI_JOURNEY
base64stringYesBase64-encoded image
notifyHookstringNoCallback URL
statestringNoCustom state

Request Example

cURL
curl -X POST https://crazyrouter.com/mj/submit/describe \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "base64": "data:image/png;base64,iVBORw0KGgo..."
  }'

POST /mj/submit/modal
Submit a Midjourney modal confirmation action (e.g. Region Vary and other operations requiring secondary confirmation).

Request Parameters

ParameterTypeRequiredDescription
taskIdstringYesOriginal task ID
promptstringNoPrompt in the modal dialog
maskBase64stringNoBase64-encoded mask image

Request Example

cURL
curl -X POST https://crazyrouter.com/mj/submit/modal \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "taskId": "task_1234567890",
    "prompt": "add a rainbow in the sky"
  }'
All actions return a new task ID after submission. Use the Query Task Status endpoint to get results.