Zum Hauptinhalt springen
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
}

Überblick

Übermitteln Sie zusätzliche Eingaben, wenn eine Action-Aufgabe status: "MODAL" zurückgibt. Dies ist für Vorgänge erforderlich, die zusätzliche Daten benötigen, wie etwa Inpainting-Masken oder benutzerdefinierte Zoom-Prompts.

Wann verwenden

VorgangWas zu übermitteln ist
Vary (Region) / InpaintmaskBase64 (PNG-Maske) + prompt
Custom Zoomprompt (z. B. “your prompt —zoom 2”)
Ein vollständiges Beispiel für einen Inpaint-Ablauf finden Sie im Midjourney API Quick Start.

Autorisierungen

Authorization
string
header
erforderlich

Bearer token authentication. Use your CometAPI key.

Body

application/json
taskId
string
Standard:example
erforderlich

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.

Antwort

200 - application/json

Success

code
integer
erforderlich

The status of the task

description
string
erforderlich
properties
object
erforderlich
result
integer
erforderlich

The task ID of the returned task