English
  • 中文
  • English
English
  • 中文
  • English
官网
服务状态
English
  • 中文
  • English
  1. Images
  • Quickstart & Conventions
  • Images
    • GPT Image 2 / 2.5 / 2.6 Generation & Editing
    • Nano Banana Image Generation
    • Gemini Native Sync Image Generation
    • Seedream 5.0 Pro / 5.5 Image Generation
    • Midjourney Image Generation
  • Videos
    • Seedance 2 Video Generation
    • Omni Video Generation
    • Seedance 2.5 Video Generation
    • MiniMax H3 Video Generation
    • WAN 3.0 Video Generation
    • Muse Video Generation
    • Seedance Asset Registration
    • Gemini Omni 1.2 Flash Video Generation
    • Seedance Volcengine Native Video Generation
    • MAGI-2 Video Generation
  • Text Models
    • Claude Desktop (CC Switch) Setup Guide
    • Codex in ChatGPT Desktop Setup Guide
    • Gemini Text Models (Native Format)
    • Text & Chat APIs (OpenAI / Claude)
  • Audio
    • Gemini Text-to-Speech (TTS)
  1. Images

Midjourney Image Generation

Generate and edit images through the native Midjourney task endpoints. Tasks run asynchronously: submit a task to obtain a task ID, poll its status, and trigger follow-up actions (upscale, variation, region inpainting, zoom, and pan) from the buttons returned by the previous task.

Endpoints & Authentication#

Send all requests to https://vip.brioi.com with your API key:
OperationMethod & 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 statusGET /mj/task/{task_id}/fetch
Batch fetch tasksPOST /mj/task/list-by-condition with body {"ids": ["TASK_ID_1", "TASK_ID_2"]}
Download imageGET /mj/image/{task_id}
Do not include model in the request body; the operation type is determined by the submission path and button customId.
Batch fetch returns an array of task objects using the same schema as single-task fetch, scoped to tasks belonging to the current API key's account; nonexistent IDs are omitted from the response. 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.

Text-to-Image (Imagine)#

ParameterTypeRequiredDescription
promptstringYesScene 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.
botTypestringNoSet to MID_JOURNEY.
statestringNoCustom caller metadata string (not an idempotency key).
Model version is controlled by --v in the prompt. Omitting --v uses the default version; check properties.finalPrompt in the completed task for the full resolved prompt and parameters.

Multi-Image Blend#

Blend multiple images into a new 2×2 grid:
ParameterDescription
base64Array2–3 publicly accessible image URLs.
dimensionsOutput aspect ratio: PORTRAIT, SQUARE, or LANDSCAPE.
Oversized input images may cause the task to fail (with failReason reporting an execution error); input images around 1024×1024 are recommended.

Image-to-Prompt (Describe)#

Generate candidate text prompts from an input image:
Once the task succeeds, read the generated descriptions from 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.

Submission Response#

{
  "code": 1,
  "description": "Submitted successfully",
  "result": "1795258475697171",
  "properties": {}
}
codeMeaning
1Submitted successfully; result is the task ID.
21Additional modal prompt required (see Region Inpainting below); result is the pending task ID.
22Queued; result is the task ID—continue polling as normal.
OtherSubmission failed; inspect description.
A successful submission only indicates that the task was accepted, not that image generation is complete. If a submission request times out or disconnects, query existing tasks first rather than immediately resubmitting.

Polling Task Status#

Poll every 5–10 seconds.
statusAction
Empty string "", NOT_START, SUBMITTED, IN_PROGRESSIn progress; continue polling.
MODALWaiting for follow-up prompt; call POST /mj/submit/modal.
SUCCESSCompleted; read imageUrl and buttons.
FAILURE, CANCELTerminated; read failReason.
Stop polling once the task enters SUCCESS, FAILURE, or CANCEL. Newly submitted tasks may briefly return an empty status and 0% progress while queued—continue polling.

Results & Action Buttons#

Excerpt from a completed poll response:
{
  "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" }
  ]
}
FieldDescription
imageUrlResult 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.finalPromptFull resolved prompt and parameters executed by Midjourney; useful for verifying model version and aspect ratio.
failReasonFailure reason, populated only when the task fails.
Download the image:
Returned images may be PNG or WebP—save the file according to the response Content-Type header.

Button Actions#

Upscales, variations, and rerolls all go through POST /mj/submit/action, with the specific action determined by the parent button's customId:
ParameterDescription
taskIdID of the immediate parent task; must already be in SUCCESS status and include the target button.
customIdCopied verbatim from buttons[].customId on the parent task.
enableRemixSet to false for standard buttons; set to true for operations requiring a follow-up prompt (such as region inpainting or custom zoom).
Save the new task ID returned in the submission response and poll that new task ID—do not poll the parent taskId for the child result.
Common button actions:
Parent TaskButtonEffect
2×2 gridU1–U4Upscale the selected quadrant into a standalone image.
2×2 gridV1–V4Generate four new variations based on the selected quadrant.
2×2 gridReroll (::reroll::)Regenerate four images from the original prompt.
Upscaled single imageUpscale (Subtle) / Upscale (Creative)Upscale 2× (e.g., 1024×1024 to 2048×2048) with subtle or creative refinement.
Upscaled single imageVary (Subtle) / Vary (Strong)Generate four new subtle or strong variations.
Upscaled single imageVary (Region)Repaint a masked region (see next section).
Upscaled single imageZoom Out 2x / Zoom Out 1.5xOutpaint outward while preserving the aspect ratio.
Upscaled single imageCustom ZoomOutpaint at a custom zoom factor with a modal prompt (see below).
Upscaled single imagePan 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).

Region Inpainting#

Region inpainting is a two-step flow: submit the Vary (Region) button action from an upscaled single image, then submit the repaint prompt and mask.
Step 1 — Submit the action with enableRemix set to true:
{
  "taskId": "1795261838736225",
  "customId": "MJ::Inpaint::1::6b01786b99f03bf628bb91f3::SOLO",
  "enableRemix": true
}
The response returns code: 21 and description: "Waiting for window confirm", where result is the pending task ID.
Step 2 — Call POST /mj/submit/modal:
{
  "taskId": "1795262079107250",
  "prompt": "a small golden star inside the cube",
  "maskBase64": "iVBORw0KGgoAAAANSUhEUgAA..."
}
ParameterDescription
taskIdresult returned in Step 1.
promptContent to generate inside the masked region.
maskBase64Raw 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.
After submitting the modal, poll that same taskId until SUCCESS. Its status may briefly remain MODAL during processing—do not resubmit.

Custom Zoom#

Custom zoom also runs in two steps. First submit the 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"
}
Specify the outpaint multiplier after --zoom (for example, 1.5), then poll that same task ID.

Limits & Error Handling#

Animation buttons (Animate (High motion), Animate (Low motion)) are unavailable and return an unknown_action error.
Buttons are scoped strictly to the task that returned them; customId values cannot be swapped across tasks.
Validation or query errors return HTTP 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.
Modified at 2026-12-04 07:58:01
Previous
Seedream 5.0 Pro / 5.5 Image Generation
Next
Seedance 2 Video Generation
Built with