跳轉到主要內容
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" 時,提交額外輸入。這是需要額外資料的操作所必需的,例如局部重繪遮罩或自訂縮放 Prompt。

何時使用

操作需提交內容
Vary (Region) / InpaintmaskBase64(PNG 遮罩)+ prompt
Custom Zoomprompt(例如:“your prompt —zoom 2”)
如需完整的局部重繪流程範例,請參閱 Midjourney API 快速開始

授權

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