Midjourney
建立 Midjourney 編輯器任務
使用 CometAPI Submit Editor API(POST /mj/submit/edits),透過 maskBase64、prompt、可選的原始圖像與透明編輯來編輯 Midjourney 圖像。
POST
cURL
使用此端點可透過遮罩編輯 Midjourney 圖像,或根據 prompt 加上來源圖像產生透明背景結果。
兩種常見模式
- 遮罩編輯:傳送
maskBase64與prompt,並可選擇性附上原始image - 透明繪製:當你想在沒有額外遮罩的情況下取得透明背景結果時,傳送
image與prompt
任務流程
1
提交編輯器任務
選擇編輯模式,傳送 prompt 與來源資料,然後儲存回傳的 task id。
2
輪詢任務
使用 Fetch Single Task 直到任務進入終態。
3
從結果繼續
直接使用最終資產,或在編輯結果提供後續按鈕時觸發 Action。
授權
Bearer token authentication. Use your CometAPI key.
主體
application/json
Text prompt describing the desired edit.
Image to edit. Pass a public URL or a base64-encoded data URI.
Custom state string. Returned as-is in the task result and webhook callback for your own tracking.
Webhook URL to receive task status updates. Falls back to your account-level webhook if omitted.
When true, return the original provider image URL instead of a CometAPI-proxied link.
回應
200 - application/json
Success