Перейти к основному содержанию
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 или пользовательские Prompt для zoom.

Когда использовать

OperationЧто отправить
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