Midjourney Imagine API
https://api.acedata.cloud/midjourney/imagine
Midjourney image generation API, text-to-image with iterative refinement.
Related Products
Midjourney - Ace Data Cloud
Midjourney image painting platform, directly connected to this API, fast and stable available.
Request Headers
acceptstring
Specify the response format returned by the server.
Please select
authorizationstring
Bearer token
Request Body
modestring
API operating mode. Available values are `fast` (fast), `relax` (relaxed), or `turbo` (ultra-fast). V8.2 supports all three modes; V8.1 currently supports only `fast` and `relax`. Subsequent operations on historical images are billed according to the actual execution mode and may inherit the original image mode.
Please select
actionstring
Operation type. Use `generate` for the first generation, and for subsequent operations, use the action values returned in the `actions` field of the response. You can also specify specific operations to process the generated image.
promptstring
English descriptive words (prompts) for generating images.
timeoutnumber
The timeout duration for API response data (seconds).
image_idstring
The ID of the generated image has been created for continuing subsequent operations based on it.
translationboolean
Is automatic translation enabled for non-English prompts, as Midjourney officially only supports English?
Please select
maskstring
URL of the mask image for operation, which can be used for the specific operation `variation_region` (local repainting).
split_imagesboolean
Whether to split the generated image into multiple single images, and return them through the `sub_image_urls` field after splitting. The default is `false`.
Please select
callback_urlstring
Webhook callback URL for asynchronous notifications.
asyncboolean
Whether to process in asynchronous mode. When set to `true`, the interface immediately returns `task_id`, without the need to provide `callback_url`, and then the result can be obtained by polling the corresponding task query interface; if `callback_url` is also provided, the result will be pushed to that callback address.
Please select
versionstring
Midjourney model version, optional `'8.2'`, `'8.1'`, `'8'`, `'7'`, `'6.1'`, `'6'`, or `'5.2'`. It is recommended to use the latest version `'8.2'`.
Please select
hdboolean
Whether to enable HD high-definition image generation. In fast generation mode, SD for V8.1 / V8.2 is 0.401 Credits, and HD is 0.801 Credits; HD generation without a specified version is also 0.801 Credits. V8.2 fast HD variation_subtle is likewise 0.801 Credits, while upscale1–upscale4 are still charged according to the extraction upscale pricing. The HD rules for V8.0 Alpha are different.
Please select
qualitystring
Image generation quality parameter. V8.2 supports `--quality` / `--q`; using `--quality` / `--q` in V8.1 is not supported, please use `hd` instead to obtain higher resolution. In V8.2, setting hd=true in fast mode uses the HD price (0.801 Credits), regardless of whether quality is omitted, 1, or 2; only quality=2 with HD not enabled remains 0.401 Credits. Please keep the request fields consistent with the prompt parameters.
style_referenceboolean
Whether a style reference (`--sref`) is used in the prompt. This field is used for accurate billing and usage auditing.
Please select
moodboardboolean
Whether moodboard references are used in the prompt. This field is used for accurate billing and usage auditing.
Please select
Response

Integration guide
Kind reminder: For streaming requests, the above code may not be fully applicable. Please refer to the integration documentation for changes.
Midjourney generation
Allow Use General Balance
When 'Allow General Balance' is enabled, the general balance is used automatically if an app's balance is insufficient.