Create a Midjourney imagine task
Use POST /mj/submit/imagine in CometAPI to create Midjourney imagine tasks with full Discord params, track task_id status, and enable image-to-video motion effects.
What the first response gives you
resultis the task id you will poll nextcodecan still be a success code even when it is not HTTP-style200
Core workflow
Poll until the task finishes
SUCCESS, MODAL, or FAILURE.Continue with post-processing
Optional video prompt pattern
If you want motion from a source image, add an image URL plus Midjourney video flags in the prompt, such as--video and --motion.Authorizations
Bearer token authentication. Use your CometAPI key.
Body
Text prompt for the generation. Supports standard Midjourney parameters such as --v, --ar, --stylize, etc.
"a paper boat floating on calm water at sunrise --v 6.1"
Bot type to use. MID_JOURNEY for Midjourney (default), NIJI_JOURNEY for Niji.
MID_JOURNEY, NIJI_JOURNEY Filter which Midjourney account modes may be used for this task.
Base64-encoded reference images. Each item should be a data URI such as data:image/png;base64,xxx.
Custom state string. Returned as-is in the task result and webhook callback for your own tracking.
Response
Task accepted.
Submission status code. 1 = submitted successfully (result carries the task id). 21 = the action opened a confirmation modal; continue with /mj/submit/modal using the returned task id. 4 = parameter error; description explains the cause.
Task id returned after submission.