跳转到内容
返回主页

Midjourney Remove Background

midjourney_remove_background

Midjourney Remove Background 精确地自动移除图像背景。

MidJourney 接口提示

MidJourney 接口分为直接生成和二次编辑两类。直接生成是指只需要提供提示词等必须参数,可以直接生成图片。二次编辑是指需要提供前一个任务 ID 和图片编号来执行图片生成。remove-background 为直接生成类别。

POST /v1/queue/midjourney_remove_background # 创建任务
GET /v1/queue/midjourney_remove_background/requests/{request_id}/status # 查询状态
GET /v1/queue/midjourney_remove_background/requests/{request_id}/response # 获取结果
PUT /v1/queue/midjourney_remove_background/requests/{request_id}/cancel # 取消任务
Terminal window
curl --location "https://cloud.seaart.ai/model/v1/queue/midjourney_remove_background" \
--header "Authorization: Bearer YOUR_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"imgUrl": "https://example.com/input.png"
}'
imgUrl string 必填

图像 URL,必须是有效的 HTTP/HTTPS URL,长度不超过 1024 字符

输入 JPEG 图片时,输出结果为 PNG

输入 WebP 图片会失败

PNG 图片可正常处理

{
"request_id": "mmsu_01hxyz...",
"response_url": "https://cloud.seaart.ai/model/v1/queue/midjourney_remove_background/requests/mmsu_01hxyz.../response",
"status_url": "https://cloud.seaart.ai/model/v1/queue/midjourney_remove_background/requests/mmsu_01hxyz.../status",
"cancel_url": "https://cloud.seaart.ai/model/v1/queue/midjourney_remove_background/requests/mmsu_01hxyz.../cancel",
"queue_position": 0
}
字段类型说明
request_idstring任务 ID,后续查询、获取结果和取消都使用它
response_urlstring获取最终结果的 URL
status_urlstring查询任务状态的 URL
cancel_urlstring取消任务的 URL
queue_positionint队列位置