创建 Midjourney imagine 任务
在 CometAPI 中使用 POST /mj/submit/imagine 创建带完整 Discord 参数的 Midjourney imagine 任务,跟踪 task_id 状态,并启用图生视频运动效果。
首次响应会返回什么
result是你接下来要轮询的任务 id- 即使不是 HTTP 风格的
200,code也仍然可能是成功状态码
核心工作流
提交 imagine 任务
轮询直到任务完成
SUCCESS、MODAL 或 FAILURE。继续进行后处理
可选的视频 prompt 模式
如果你希望基于源图像生成运动效果,请在 prompt 中添加图片 URL 以及 Midjourney 视频标志,例如--video 和 --motion。授权
Bearer token authentication. Use your CometAPI key.
请求体
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.
响应
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.