Midjourney アクションタスクを作成する
CometAPI POST /mj/submit/action を使って、生成された画像に対して Midjourney のアクション(upscale、variation、reroll、zoom など)を適用します。
必要な値は 2 つです
- 元の、または最新の Midjourney タスクから取得した
taskId - 単一タスクを取得 が返す最新の
buttons配列から取得したcustomId
一般的なアクション
U1からU4: グリッド内の 1 枚の画像を upscaleV1からV4: 1 つの画像位置から variation を生成- Reroll: グリッド全体を再生成
- Zoom と Pan: 既存の構図を拡張
アクション送信後
後続タスクを作成
taskId と customId を送信し、新しく返された task id を保存します。新しいタスクをポーリング
モーダル専用アクションを処理
MODAL に達した場合は、追加入力を提供するために Modal に進んでください。承認
Bearer token authentication. Use your CometAPI key.
ボディ
Action id taken from the latest buttons array returned by the fetch endpoint.
Midjourney task id you want to continue from.
Custom state string. Returned as-is in the task result and webhook callback for your own tracking.
Whether to force remix mode when the current action supports it.
Whether to prefer the same provider account used by the current task.
レスポンス
Action task accepted.
Submission status code. 1 = submitted successfully (result carries the task id). 21 = the action opened a confirmation modal; continue with /mj/submit/modal using the returned task id. 4 = parameter error; description explains the cause.
New Midjourney task id created for the action.