Midjourney
创建 Midjourney 编辑任务
使用 CometAPI Submit Editor API(POST /mj/submit/edits)通过 maskBase64、prompt、可选原图以及透明编辑来编辑 Midjourney 图像。
POST
cURL
使用此端点可以通过蒙版编辑 Midjourney 图像,或者基于 prompt 和源图像生成透明背景结果。
两种常见模式
- 蒙版编辑:发送
maskBase64和prompt,也可选择附带原始image - 透明绘制:当你希望在不提供单独蒙版的情况下获得透明背景结果时,发送
image和prompt
任务流程
1
提交编辑任务
选择编辑模式,发送 prompt 和源数据,然后保存返回的任务 id。
2
轮询任务
使用 获取单个任务 直到任务进入终态。
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