Створення action task для Midjourney
Використовуйте CometAPI POST /mj/submit/action, щоб застосовувати дії Midjourney — upscale, variation, reroll, zoom та інші — до згенерованих зображень.
Вам потрібні два значення
taskIdз початкової або найновішої задачі MidjourneycustomIdз останнього масивуbuttons, поверненого Fetch Single Task
Поширені дії
U1toU4: upscale одного зображення з сіткиV1toV4: згенерувати variation з однієї позиції зображення- Reroll: повторно згенерувати всю сітку
- Zoom and Pan: розширити наявну композицію
Після надсилання дії
Створіть follow-up task
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 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.