Passer au contenu principal
POST
/
mj
/
submit
/
action
Create a Midjourney follow-up action 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>"
  }
}
Utilisez ce endpoint après qu’une tâche Midjourney a renvoyé des boutons d’action. Il lance une nouvelle tâche en aval, comme un upscale, une variation, un reroll, un zoom ou un pan.

Vous avez besoin de deux valeurs

  • taskId de la tâche Midjourney d’origine ou de la plus récente
  • customId du dernier tableau buttons renvoyé par Fetch Single Task
customId n’est pas stable. Ne le codez jamais en dur. Lisez-le toujours à partir de la dernière réponse de polling.

Actions courantes

  • U1 à U4 : upscale une image de la grille
  • V1 à V4 : génère des variations à partir d’une position d’image
  • Reroll : régénère la grille complète
  • Zoom et Pan : étendent la composition existante

Après avoir soumis une action

1

Créer la tâche de suivi

Envoyez taskId et customId, puis stockez le nouvel id de tâche renvoyé.
2

Interroger la nouvelle tâche

Interrogez de nouveau Fetch Single Task jusqu’à ce que l’action soit terminée.
3

Gérer les actions nécessitant un modal

Si la nouvelle tâche atteint MODAL, poursuivez avec Modal pour fournir l’entrée supplémentaire.

Autorisations

Authorization
string
header
requis

Bearer token authentication. Use your CometAPI key.

Corps

application/json
customId
string
requis

Action id taken from the latest buttons array returned by the fetch endpoint.

taskId
string
requis

Midjourney task id you want to continue from.

state
string

Custom state string. Returned as-is in the task result and webhook callback for your own tracking.

enableRemix
boolean

Whether to force remix mode when the current action supports it.

chooseSameChannel
boolean

Whether to prefer the same channel account used by the current task.

Réponse

200 - application/json

Action task accepted.

code
integer
requis
description
string
requis
result
string
requis

New Midjourney task id created for the action.

properties
object