Перейти до основного вмісту
POST
/
mj
/
submit
/
modal
Modal (Area Redesign & Zoom)
curl --request POST \
  --url https://api.cometapi.com/mj/submit/modal \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "taskId": "14001934816969359"
}
'
{
  "code": 123,
  "description": "<string>",
  "properties": {},
  "result": 123
}

Огляд

Надішліть додаткові вхідні дані, коли завдання Action повертає status: "MODAL". Це потрібно для операцій, яким потрібні додаткові дані, наприклад маски inpainting або custom zoom Prompt.

Коли використовувати

ОпераціяЩо надсилати
Vary (Region) / InpaintmaskBase64 (PNG-маска) + prompt
Custom Zoomprompt (наприклад, “your prompt —zoom 2”)
Щоб переглянути повний приклад процесу inpaint, дивіться Midjourney API Quick Start.

Авторизації

Authorization
string
header
обов'язково

Bearer token authentication. Use your CometAPI key.

Тіло

application/json
taskId
string
за замовчуванням:example
обов'язково

Task id from the parent task whose modal action you are continuing.

maskBase64
string

Base64-encoded mask image for partial inpainting. White areas are repainted; black areas are preserved.

prompt
string

Text prompt describing the desired change for the selected region.

Відповідь

200 - application/json

Success

code
integer
обов'язково

The status of the task

description
string
обов'язково
properties
object
обов'язково
result
integer
обов'язково

The task ID of the returned task