建立 Midjourney imagine 任務
在 CometAPI 中使用 POST /mj/submit/imagine 建立 Midjourney imagine 任務,支援完整 Discord 參數、追蹤 task_id 狀態,並啟用 image-to-video 動態效果。
第一個回應會提供什麼
result是你接下來要輪詢的 task idcode即使不是 HTTP 樣式的200,仍然可能是成功代碼
核心工作流程
提交 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.