Midjourney Task Submission
Submit Midjourney imagine, blend, action, modal, describe, shorten, video, swap face, and Discord image upload tasks.
https://zx1.deepwl.net/mj/submit/imaginecurl -X POST https://zx1.deepwl.net/mj/submit/imagine \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "RELAX",
"notifyHook": "",
"base64Array": [
"data:image/png;base64,xxx1",
"data:image/png;base64,xxx2"
],
"prompt": "Cat",
"state": ""
}'{
"code": 1,
"description": "Submit success",
"result": "1712158011464906"
}The Midjourney submission interfaces all belong to the /mj/submit/* group (face swap uses /mj/insight-face/swap). Different actions use different paths, but the success response style is the same: code / description / result.
Endpoints
| Method | Path | Purpose |
|---|---|---|
POST | /mj/submit/imagine | Text-to-image / image-to-image (Imagine) |
POST | /mj/submit/blend | Blend images |
POST | /mj/submit/action | Execute button actions (UPSCALE / VARIATION / REROLL / ZOOM / PAN, etc.) |
POST | /mj/submit/modal | Inpainting / ZOOM with an extra prompt (Modal) |
POST | /mj/submit/describe | Image-to-text (Describe) |
POST | /mj/submit/shorten | Prompt analysis (Shorten) |
POST | /mj/submit/video | Video generation / extension (Video) |
POST | /mj/insight-face/swap | Face swap (SwapFace, multipart upload) |
POST | /mj/submit/upload-discord-images | Upload images to Discord and return their URLs |
Request Headers
Authorizationstring必填Authentication header. Uses a Bearer token, e.g. Bearer YOUR_API_KEY.
Content-Typestring必填Request content type, must be application/json (the face swap endpoint uses multipart/form-data).
Submit Imagine Task
POST /mj/submit/imagine
Runs an Imagine operation to submit a drawing task.
modestring默认值: RELAXCall mode, default RELAX. RELAX: slow mode; FAST: fast mode.
promptstring必填Prompt, e.g. Cat.
base64Arrayarray<string>Base64 array of reference images, e.g. data:image/png;base64,xxx1.
notifyHookstringCallback URL. The doc schema writes it as notifyhook, which is equivalent to notifyHook.
statestringCustom parameter, passed through as-is.
The doc schema does not mark request-body fields as required. The table above marks prompt as required based on gateway-side validation (it returns prompt_is_required when missing). Imagine has no botType field.
Submit Blend Task
POST /mj/submit/blend
Runs a Blend operation to submit a blend task.
modestring默认值: RELAXCall mode, default RELAX. RELAX: slow mode; FAST: fast mode.
base64Arrayarray<string>必填Base64 array of images.
dimensionsstringAspect ratio. Allowed values: PORTRAIT (2:3), SQUARE (1:1), LANDSCAPE (3:2), e.g. SQUARE.
botTypestringBot type: mj for MID_JOURNEY, niji for NIJI_JOURNEY.
notifyHookstringCallback URL; no callback is made when empty.
statestringCustom parameter.
Submit Action Task
POST /mj/submit/action
Executes button actions (upscale, variation, reroll, zoom, pan, etc.). customId comes from buttons[].customId returned by the task query endpoint — pass it to this endpoint to trigger the corresponding button.
taskIdstring必填Task ID.
customIdstring必填Action identifier, e.g. MJ::JOB::upsample::2::3dbbd469-36af-4a0f-8f02-df6c579e7011.
modestring默认值: RELAXCall mode, default RELAX. RELAX: slow mode; FAST: fast mode.
botTypestringBot type: mj for MID_JOURNEY, niji for NIJI_JOURNEY.
notifyHookstringCallback URL; no callback is made when empty.
statestringCustom parameter.
Submit Modal Task
POST /mj/submit/modal
Call this when a task needs an additional prompt (for example, when its status is MODAL) or for inpainting.
taskIdstring必填Task ID, e.g. 14001934816969359.
maskBase64stringBase64 of the inpainting mask; used when performing inpainting.
promptstringPrompt; required in most cases.
Submit Describe Task
POST /mj/submit/describe
Runs a Describe operation to submit an image-to-text task.
modestring默认值: RELAXCall mode, default RELAX. RELAX: slow mode; FAST: fast mode.
base64stringImage Base64 (single image), e.g. data:image/png;base64,xxx.
botTypestringBot type: mj for MID_JOURNEY, niji for NIJI_JOURNEY.
notifyHookstringCallback URL; no callback is made when empty.
statestringCustom parameter.
The doc uses a single-image base64 field for Describe (there is no base64Array). Some gateway implementations accept base64Array instead — if parameter validation fails, switch to base64.
Submit Shorten Task
POST /mj/submit/shorten
Runs a Shorten operation to analyze and shorten the prompt.
modestring默认值: RELAXCall mode, default RELAX. RELAX: slow mode; FAST: fast mode.
promptstring必填Prompt, e.g. Cat.
botTypestringBot type: mj for MID_JOURNEY, niji for NIJI_JOURNEY.
notifyHookstringCallback URL; no callback is made when empty.
statestringCustom parameter.
Submit Video Task
POST /mj/submit/video
The Video endpoint currently supports two modes:
- Generate a video directly from a
prompt - Continue from an existing
taskId(video extension)
modestring默认值: RELAXCall mode, default RELAX. RELAX: slow mode; FAST: fast mode.
promptstringPrompt, e.g. Cat; used when generating a video directly.
taskIdstringID of the parent video task to operate on.
indexintegerIndex of the video to operate on; required when action is not empty.
motionstringMotion strength. Allowed values: low, high.
imagestringFirst-frame image; accepts url or base64; may be empty when extending.
actionstringOperation on the video task; allowed value extend. When not empty, index and taskId are required.
statestringCustom parameter.
notifyHookstringCallback URL; no callback is made when empty.
Submit SwapFace Task
POST /mj/insight-face/swap
Submits a SwapFace task using multipart/form-data with two images.
modestring默认值: RELAXCall mode, default RELAX. RELAX: slow mode; FAST: fast mode.
sourcefile必填Source face image.
targetfile必填Target image.
The doc uses a multipart/form-data upload (source / target). The gateway also accepts a JSON Base64 form (sourceBase64 / targetBase64); when missing it returns sour_base64_and_target_base64_is_required.
Upload Files to Discord
POST /mj/submit/upload-discord-images
Uploads images to Discord and returns a list of image URLs.
modestring默认值: RELAXCall mode, default RELAX. RELAX: slow mode; FAST: fast mode.
base64Arrayarray<string>Base64 array, e.g. data:image/png;base64,xxx1.
Request Examples
Complete call examples for each endpoint; switch between them via the tabs:
Response Examples
The success response below applies to all submission endpoints (for the Discord upload endpoint, result is an array of image URLs).
Response Fields
codeintegerStatus code: 1 submitted successfully, 22 queued, 23 queue full (try again later), 24 prompt may contain sensitive words, other error. The doc marks code, description, and result as required response fields.
descriptionstringStatus description.
resultstring | array<string>Task ID. The Discord upload endpoint returns an array of image URLs.
Common Local Validation Errors
| Description | Common trigger |
|---|---|
bind_request_body_failed | Malformed request body |
prompt_is_required | prompt missing for Imagine / Shorten |
task_id_is_required | taskId missing when continuing from a task |
action_is_required | action missing on a continue-type endpoint |
index_is_required | index missing on a continue-type endpoint |
content_is_required | content missing for simple-change operations (a gateway extension endpoint not covered by the doc) |
task_not_found | The referenced task does not exist |
task_status_not_success | The referenced task has not succeeded yet |
quota_not_enough | Insufficient balance |