Midjourney
Imagine (text-to-image)
Midjourney text-to-image / image-guided generation. The default entry /v1/midjourney/generations and the explicit /imagine entry behave the same
POST
imagine. The explicit /v1/midjourney/generations/imagine endpoint behaves the same way.
| Item | Value |
|---|---|
| action | IMAGINE |
| Billing | midjourney@imagine[-version][-speed] |
| Required | prompt |
| Optional | image_urls, prompt fields, speed, metadata |
Request body
| Field | Type | Required | Notes |
|---|---|---|---|
prompt | string | Yes | Prompt; native MJ flags allowed (e.g. --ar 16:9 --v 6.1) |
speed | string | No | relax (default) / fast / turbo |
image_urls | string[] | No | Image URLs or base64 for image-guided generation |
metadata | object | No | Custom metadata saved with the task for business-side tracking |
Structured fields (optional)
You can set these in the JSON body or inprompt (e.g. --ar 16:9). Body values override prompt.
| Field | Type | MJ equivalent | Notes |
|---|---|---|---|
size | string | --ar | e.g. "16:9", "1:1", "9:16" |
quality | string | --q | "0.25", "0.5", "1", "2" |
style | string | --style | e.g. "raw" |
version | string | --v | Version. Main MJ versions append --v <version>; when used with niji: true and "7" / "6", it is normalized as a Niji version |
seed | int | --seed | Seed |
negative_prompt | string | --no | e.g. "ugly, blurry" |
stylize | int | --s | 0–1000 |
chaos | int | --c | 0–100 |
weird | int | --w | 0–3000 |
tile | bool | --tile | Tile mode |
niji | bool | --niji | Niji switch. Recommended: niji: true + version: "7" / "6" |
iw | float | --iw | 0–3, image weight |
cw | int | --cw | 0–100 |
sw | int | --sw | 0–1000 |
cref | string | --cref | Character ref URL |
sref | string | --sref | Style ref URL |
dref | string | --dref | Depth reference image URL |
dw | float | --dw | Depth weight (0–100) |
repeat | int | --repeat | 2–40 |
raw | bool | --raw | Raw style (v5.1+) |
draft | bool | --draft | Draft mode (v7+) |
hd | bool | --hd | HD mode (v8 / v8.1 only; backend auto-injects --v 8.1 when version is unspecified) |
stop | int | --stop | Early stop (10–100; v5–6.1 / niji 5–6 only) |
extra | string | any --xxx | Escape hatch; appended to prompt verbatim |
Examples
All flags in promptVerified online versions:Mixed (body wins)8.1,7,6.1,5.2,5.1,niji 7, andniji 6. Use body fieldversionfor main MJ versions. For Niji, useniji: true+version: "7"/"6"; the billing version is normalized toniji7/niji6.
Final prompt:Image-guideda beautiful sunset --ar 16:9(sizein body overrides--ar 1:1in prompt.)
speed=relaxor omittedspeeddoes not add a billing speed suffix.fast/turboare applied through the corresponding speed routes and match the corresponding billing keys.