Skip to main content
POST
cURL
Sử dụng endpoint này để chỉnh sửa một hình ảnh Midjourney bằng mask, hoặc để tạo kết quả có nền trong suốt từ prompt kết hợp với ảnh nguồn.

Hai chế độ phổ biến

  • Chỉnh sửa có mask: gửi maskBase64 cùng với prompt, và có thể tùy chọn gửi image gốc
  • Vẽ trong suốt: gửi image cùng với prompt khi bạn muốn nhận kết quả có nền trong suốt mà không cần mask riêng

Luồng tác vụ

1

Gửi tác vụ chỉnh sửa

Chọn chế độ chỉnh sửa, gửi prompt và dữ liệu nguồn, sau đó lưu task id được trả về.
2

Thăm dò tác vụ

Sử dụng Fetch Single Task cho đến khi tác vụ đạt đến trạng thái kết thúc.
3

Tiếp tục từ kết quả

Sử dụng trực tiếp tài nguyên cuối cùng, hoặc kích hoạt Action khi kết quả đã chỉnh sửa hiển thị các nút thao tác tiếp theo.

Ủy quyền

Authorization
string
header
bắt buộc

Bearer token authentication. Use your CometAPI key.

Nội dung

application/json
prompt
string
mặc định:Change to white background
bắt buộc

Text prompt describing the desired edit.

image
string
mặc định:https://your-image-host/source.png
bắt buộc

Image to edit. Pass a public URL or a base64-encoded data URI.

state
string

Custom state string. Returned as-is in the task result and webhook callback for your own tracking.

notifyHook
string

Webhook URL to receive task status updates. Falls back to your account-level webhook if omitted.

noStorage
boolean

When true, return the original provider image URL instead of a CometAPI-proxied link.

Phản hồi

200 - application/json

Success

code
integer

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.

description
string
result
string