メインコンテンツへスキップ
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 タスクがアクションボタンを返した後に使用します。upscale、variation、reroll、zoom、pan などの新しい後続タスクを開始します。

必要な値は 2 つです

  • 元の、または直近の Midjourney タスクの taskId
  • Fetch Single Task が返す最新の buttons 配列内の customId
customId は固定ではありません。絶対にハードコードしないでください。必ず最新のポーリングレスポンスから読み取ってください。

一般的なアクション

  • U1 から U4: グリッド内の 1 枚の画像をアップスケール
  • V1 から V4: 1 つの画像位置からバリエーションを生成
  • Reroll: グリッド全体を再生成
  • Zoom と Pan: 既存の構図を拡張

アクション送信後

1

後続タスクを作成

taskIdcustomId を送信し、新しく返された task id を保存します。
2

新しいタスクをポーリング

アクションが完了するまで、再度 Fetch Single Task を照会します。
3

モーダル専用アクションを処理

新しいタスクが 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