Используйте CometAPI POST /mj/submit/action, чтобы применять действия Midjourney — upscale, variation, reroll, zoom и другие — к изображениям, созданным через imaging.
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>"
}
}taskId из исходной или самой последней задачи MidjourneycustomId из последнего массива buttons, возвращённого в Fetch Single TaskcustomId не является стабильным. Никогда не хардкодьте его. Всегда считывайте его из последнего ответа polling.U1 to U4: увеличить одно изображение из сеткиV1 to V4: сгенерировать вариации из одной позиции изображенияСоздайте последующую задачу
taskId и customId, затем сохраните id новой возвращённой задачи.Опросите новую задачу
Обработайте действия только с modal
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>"
}
}