buttons returned by the previous task.https://vip.brioi.com with your API key:| Operation | Method & Path |
|---|---|
| Text-to-image (Imagine) | POST /mj/submit/imagine |
| Multi-image blend (Blend) | POST /mj/submit/blend |
| Image-to-prompt (Describe) | POST /mj/submit/describe |
| Button action (upscale, variation, reroll, etc.) | POST /mj/submit/action |
| Modal confirmation (inpainting, custom zoom, etc.) | POST /mj/submit/modal |
| Fetch task status | GET /mj/task/{task_id}/fetch |
| Batch fetch tasks | POST /mj/task/list-by-condition with body {"ids": ["TASK_ID_1", "TASK_ID_2"]} |
| Download image | GET /mj/image/{task_id} |
model in the request body; the operation type is determined by the submission path and button customId.GET /mj/image/{task_id} does not require an API key—anyone with the URL can download the image, so do not share it publicly.| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | Scene description. Append Midjourney parameters at the end, such as --ar 16:9, --v 7, or --stylize 100. When using reference images, place public image URLs at the beginning of prompt. |
botType | string | No | Set to MID_JOURNEY. |
state | string | No | Custom caller metadata string (not an idempotency key). |
--v in the prompt. Omitting --v uses the default version; check properties.finalPrompt in the completed task for the full resolved prompt and parameters.| Parameter | Description |
|---|---|
base64Array | 2–3 publicly accessible image URLs. |
dimensions | Output aspect ratio: PORTRAIT, SQUARE, or LANDSCAPE. |
failReason reporting an execution error); input images around 1024×1024 are recommended.promptEn or properties.finalPrompt, separated by newlines. Descriptions may be returned in Chinese—do not assume they are always English. Describe does not generate a new image; imageUrl is not the output.{
"code": 1,
"description": "Submitted successfully",
"result": "1795258475697171",
"properties": {}
}code | Meaning |
|---|---|
1 | Submitted successfully; result is the task ID. |
21 | Additional modal prompt required (see Region Inpainting below); result is the pending task ID. |
22 | Queued; result is the task ID—continue polling as normal. |
| Other | Submission failed; inspect description. |
status | Action |
|---|---|
Empty string "", NOT_START, SUBMITTED, IN_PROGRESS | In progress; continue polling. |
MODAL | Waiting for follow-up prompt; call POST /mj/submit/modal. |
SUCCESS | Completed; read imageUrl and buttons. |
FAILURE, CANCEL | Terminated; read failReason. |
SUCCESS, FAILURE, or CANCEL. Newly submitted tasks may briefly return an empty status and 0% progress while queued—continue polling.{
"id": "1795258475697171",
"action": "IMAGINE",
"status": "SUCCESS",
"progress": "100%",
"imageUrl": "https://vip.brioi.com/mj/image/1795258475697171",
"properties": {
"finalPrompt": "a red glass cube on a plain white background, studio light --ar 1:1 --v 7 --stylize 100 --fast"
},
"buttons": [
{ "label": "U1", "customId": "MJ::JOB::upsample::1::6b01786b99f03bf628bb91f3" },
{ "label": "V1", "customId": "MJ::JOB::variation::1::6b01786b99f03bf628bb91f3" },
{ "label": "", "customId": "MJ::JOB::reroll::0::6b01786b99f03bf628bb91f3::SOLO" }
]
}| Field | Description |
|---|---|
imageUrl | Result image URL. Imagine, variation, and inpainting tasks return a 2×2 composite grid; use U1–U4 to extract and upscale an individual image. |
buttons[] | Follow-up actions available on this task. Pass customId verbatim—never construct it manually or reuse values across tasks. |
properties.finalPrompt | Full resolved prompt and parameters executed by Midjourney; useful for verifying model version and aspect ratio. |
failReason | Failure reason, populated only when the task fails. |
Content-Type header.POST /mj/submit/action, with the specific action determined by the parent button's customId:| Parameter | Description |
|---|---|
taskId | ID of the immediate parent task; must already be in SUCCESS status and include the target button. |
customId | Copied verbatim from buttons[].customId on the parent task. |
enableRemix | Set to false for standard buttons; set to true for operations requiring a follow-up prompt (such as region inpainting or custom zoom). |
taskId for the child result.| Parent Task | Button | Effect |
|---|---|---|
| 2×2 grid | U1–U4 | Upscale the selected quadrant into a standalone image. |
| 2×2 grid | V1–V4 | Generate four new variations based on the selected quadrant. |
| 2×2 grid | Reroll (::reroll::) | Regenerate four images from the original prompt. |
| Upscaled single image | Upscale (Subtle) / Upscale (Creative) | Upscale 2× (e.g., 1024×1024 to 2048×2048) with subtle or creative refinement. |
| Upscaled single image | Vary (Subtle) / Vary (Strong) | Generate four new subtle or strong variations. |
| Upscaled single image | Vary (Region) | Repaint a masked region (see next section). |
| Upscaled single image | Zoom Out 2x / Zoom Out 1.5x | Outpaint outward while preserving the aspect ratio. |
| Upscaled single image | Custom Zoom | Outpaint at a custom zoom factor with a modal prompt (see below). |
| Upscaled single image | Pan arrows (::pan_left::, ::pan_right::, ::pan_up::, ::pan_down::) | Extend the canvas in the chosen direction (horizontal pans widen the image; vertical pans increase height). |
Vary (Region) button action from an upscaled single image, then submit the repaint prompt and mask.enableRemix set to true:{
"taskId": "1795261838736225",
"customId": "MJ::Inpaint::1::6b01786b99f03bf628bb91f3::SOLO",
"enableRemix": true
}code: 21 and description: "Waiting for window confirm", where result is the pending task ID.POST /mj/submit/modal:{
"taskId": "1795262079107250",
"prompt": "a small golden star inside the cube",
"maskBase64": "iVBORw0KGgoAAAANSUhEUgAA..."
}| Parameter | Description |
|---|---|
taskId | result returned in Step 1. |
prompt | Content to generate inside the masked region. |
maskBase64 | Raw base64-encoded PNG mask without a data:image/png;base64, prefix. Must match the dimensions of the source single image; white areas are repainted and black areas are preserved. |
taskId until SUCCESS. Its status may briefly remain MODAL during processing—do not resubmit.Custom Zoom button action from an upscaled single image with enableRemix: true (returning code: 21), then call POST /mj/submit/modal with the zoom factor appended to the prompt:{
"taskId": "ACTION_RESPONSE_RESULT",
"prompt": "a red glass cube on a plain white background, studio light --zoom 1.5"
}--zoom (for example, 1.5), then poll that same task ID.Animate (High motion), Animate (Low motion)) are unavailable and return an unknown_action error.customId values cannot be swapped across tasks.400 with a body shaped like {"code": 4, "description": "Error description"}—inspect description to diagnose (task_no_found indicates the queried task does not exist).401 indicates a missing or invalid API key, 403 indicates insufficient balance/quota or missing model permission, 429 indicates rate limiting or server busy (code 30), and 503 indicates the service is temporarily unavailable.