Imagine (text-to-image)
Video & image generation
Imagine (text-to-image)
POST /mj/submit/imagine — submit a Midjourney text-to-image task
POST
Imagine (text-to-image)
Submit a Midjourney text-to-image task (equivalent to Discord’s
/imagine).
Request
Parameters
| Field | Type | Required | Description |
|---|---|---|---|
prompt | string | ✅ | Generation prompt, may include parameters like --ar, --v, --style |
base64Array | array | Array of reference-image base64 (the image prompt attached to /imagine) | |
notifyHook | string | Callback URL; OpenPAI POSTs the task result when it completes | |
state | string | Custom pass-through field, returned verbatim in the callback | |
botType | string | MID_JOURNEY (default) or NIJI_JOURNEY |
Response
result is the task ID — use it later to query progress or submit U/V actions.
| code | Meaning |
|---|---|
1 | Submitted successfully |
21 | An identical task already exists (will be reused) |
22 | The task entered the queue |
-1 | Submission failed, see description |