Skip to main content
POST
Midjourney Task Submission

Midjourney Task Submission

The Midjourney submission interfaces all belong to the /mj/submit/* group. Different actions use different paths, but the success response style is basically the same.

Common Response

integer
Status code. Common values: 1 submission successful, 22 queued, 23 queue full, 24 prompt may contain sensitive words.
string
Status description.
string | array<string>
Task ID. The upload Discord image interface returns an array of image URLs.

Authentication

Submit Imagine Task

Perform the Imagine action and submit an image generation task.
string
required
Invocation mode, common values are RELAX and FAST.
string
required
Prompt.
array<string>
Base64 array for image references.
string
Custom parameter.
string
Callback URL.

Submit Blend Task

Perform the Blend action and submit an image blending task.
string
required
Invocation mode, common values are RELAX and FAST.
array<string>
required
Image Base64 array.
string
Ratio. Common values: PORTRAIT, SQUARE, LANDSCAPE.
string
Bot type, common values: mj, niji.
string
Callback URL.
string
Custom parameter.

Submit Modal Task

When other tasks return code = 21 or require additional prompt input, you can call this interface to continue submitting.
string
required
Original task ID.
string
Base64 for the partial redraw mask.
string
New prompt.

Submit Describe Task

Perform the Describe action and submit an image-to-text task.
The Apifox example you provided uses the base64 field; however, the current project DTO explicitly accepts base64Array. If the upstream channel requires a single-image base64, it is recommended to verify it together with the actual gateway behavior. This document preserves the Apifox invocation style here, but on the project side the main guarantee is that this route exists.

Submit Shorten Task

Perform the Shorten action.

Submit SwapFace Task

Submit a SwapFace face-swapping task. The current project code actually parses it in JSON Base64 format:
This is different from the multipart/form-data file upload example you provided in Apifox. The current gateway code actually validates sourceBase64 and targetBase64; if they are missing, it will return sour_base64_and_target_base64_is_required.

Submit Video Task

The Video interface currently supports two modes:
  1. Generate a video directly based on prompt
  2. Continue generating a video based on an existing taskId
string
required
Invocation mode, common values are RELAX and FAST.
string
Parent task ID. Used when extending a video based on an existing image.
integer
Video index number.
string
Motion intensity, common values: low, high.
string
Video task action. In examples, the common value is extend.

Upload Files to Discord

Upload images to Discord and return a list of image URLs.

Common Local Validation Errors