Skip to main content
POST
cURL
Gunakan endpoint ini untuk mengedit gambar Midjourney dengan mask, atau untuk menghasilkan hasil berlatar belakang transparan dari prompt ditambah gambar sumber.

Dua mode umum

  • Edit bermask: kirim maskBase64 plus prompt, dan secara opsional image asli
  • Gambar transparan: kirim image plus prompt saat Anda menginginkan hasil berlatar belakang transparan tanpa mask terpisah

Alur task

1

Kirim task editor

Pilih mode pengeditan, kirim prompt dan data sumber, lalu simpan id task yang dikembalikan.
2

Poll task

Gunakan Fetch Single Task sampai task mencapai status terminal.
3

Lanjutkan dari hasil

Gunakan aset akhir secara langsung, atau picu Action saat hasil edit menampilkan tombol tindak lanjut.

Otorisasi

Authorization
string
header
wajib

Bearer token authentication. Use your CometAPI key.

Body

application/json
prompt
string
default:Change to white background
wajib

Text prompt describing the desired edit.

image
string
default:https://your-image-host/source.png
wajib

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.

Respons

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