跳转到主要内容
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 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