跳轉到主要內容
POST
/
mj
/
submit
/
action
Create a Midjourney follow-up action task
curl --request POST \
  --url https://api.cometapi.com/mj/submit/action \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customId": "MJ::JOB::variation::3::example",
  "taskId": "1773314942177684"
}
'
{
  "code": 123,
  "description": "<string>",
  "result": "<string>",
  "properties": {
    "numberOfQueues": 123,
    "discordInstanceId": "<string>",
    "discordChannelId": "<string>"
  }
}
在 Midjourney 任務回傳操作按鈕後,請使用此端點。它會啟動新的下游任務,例如放大、變化、重跑、縮放或平移。

你需要兩個值

  • 來自原始或最新 Midjourney 任務的 taskId
  • 來自 Fetch Single Task 回傳的最新 buttons 陣列中的 customId
customId 並不穩定。請勿將其硬編碼。務必從最新的輪詢回應中讀取。

常見操作

  • U1U4:從網格中放大其中一張圖片
  • V1V4:根據某個圖片位置產生變化版本
  • Reroll:重新生成整個網格
  • Zoom 和 Pan:延伸現有構圖

提交操作後

1

建立後續任務

傳送 taskIdcustomId,然後儲存新回傳的 task id。
2

輪詢新任務

再次查詢 Fetch Single Task,直到操作完成。
3

處理僅限 modal 的操作

如果新任務進入 MODAL,請繼續參考 Modal 提供額外輸入。

授權

Authorization
string
header
必填

Bearer token authentication. Use your CometAPI key.

主體

application/json
customId
string
必填

Action id taken from the latest buttons array returned by the fetch endpoint.

taskId
string
必填

Midjourney task id you want to continue from.

state
string

Custom state string. Returned as-is in the task result and webhook callback for your own tracking.

enableRemix
boolean

Whether to force remix mode when the current action supports it.

chooseSameChannel
boolean

Whether to prefer the same channel account used by the current task.

回應

200 - application/json

Action task accepted.

code
integer
必填
description
string
必填
result
string
必填

New Midjourney task id created for the action.

properties
object