Crear una tarea imagine de Midjourney
Usa POST /mj/submit/imagine en CometAPI para crear tareas imagine de Midjourney con parámetros completos de Discord, rastrear el estado de task_id y habilitar efectos de movimiento de imagen a video.
Qué te da la primera respuesta
resultes el id de tarea que consultarás a continuacióncodepuede seguir siendo un código de éxito incluso cuando no es un200al estilo HTTP
Flujo de trabajo principal
Enviar la tarea imagine
Consultar hasta que la tarea termine
SUCCESS, MODAL o FAILURE.Continuar con el posprocesamiento
Patrón opcional de prompt de video
Si quieres movimiento a partir de una imagen de origen, agrega una URL de imagen más flags de video de Midjourney en el prompt, como--video y --motion.Autorizaciones
Bearer token authentication. Use your CometAPI key.
Cuerpo
Text prompt for the generation. Supports standard Midjourney parameters such as --v, --ar, --stylize, etc.
"a paper boat floating on calm water at sunrise --v 6.1"
Bot type to use. MID_JOURNEY for Midjourney (default), NIJI_JOURNEY for Niji.
MID_JOURNEY, NIJI_JOURNEY Filter which Midjourney account modes may be used for this task.
Base64-encoded reference images. Each item should be a data URI such as data:image/png;base64,xxx.
Custom state string. Returned as-is in the task result and webhook callback for your own tracking.
Respuesta
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.
Task id returned after submission.