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

code
integer
Status code. Common values: 1 submission successful, 22 queued, 23 queue full, 24 prompt may contain sensitive words.
description
string
Status description.
result
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.
mode
string
required
Invocation mode, common values are RELAX and FAST.
prompt
string
required
Prompt.
base64Array
array<string>
Base64 array for image references.
state
string
Custom parameter.
notifyHook
string
Callback URL.

Submit Blend Task

Perform the Blend action and submit an image blending task.
mode
string
required
Invocation mode, common values are RELAX and FAST.
base64Array
array<string>
required
Image Base64 array.
dimensions
string
Ratio. Common values: PORTRAIT, SQUARE, LANDSCAPE.
botType
string
Bot type, common values: mj, niji.
notifyHook
string
Callback URL.
state
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.
taskId
string
required
Original task ID.
maskBase64
string
Base64 for the partial redraw mask.
prompt
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
mode
string
required
Invocation mode, common values are RELAX and FAST.
taskId
string
Parent task ID. Used when extending a video based on an existing image.
index
integer
Video index number.
motion
string
Motion intensity, common values: low, high.
action
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