CometAPI の POST /mj/submit/action を使用して、imaging 経由で生成された画像に Midjourney のアクション(upscale、variation、reroll、zoom など)を適用します。
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>"
}
}taskIdbuttons 配列内の customIdcustomId は固定ではありません。絶対にハードコードしないでください。必ず最新のポーリングレスポンスから読み取ってください。U1 から U4: グリッド内の 1 枚の画像をアップスケールV1 から V4: 1 つの画像位置からバリエーションを生成新しいタスクをポーリング
モーダル専用アクションを処理
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 channel account used by the current 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>"
}
}