Vai al contenuto principale
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>"
  }
}
Usa questo endpoint dopo che un task Midjourney restituisce i pulsanti di azione. Avvia un nuovo task downstream come upscale, variation, reroll, zoom o pan.

Ti servono due valori

  • taskId dal task Midjourney originale o più recente
  • customId dall’ultimo array buttons restituito da Fetch Single Task
customId non è stabile. Non inserirlo mai hardcoded. Leggilo sempre dall’ultima risposta di polling.

Azioni comuni

  • U1 a U4: esegue l’upscale di un’immagine della griglia
  • V1 a V4: genera variazioni da una posizione dell’immagine
  • Reroll: rigenera l’intera griglia
  • Zoom e Pan: estendono la composizione esistente

Dopo aver inviato un’azione

1

Crea il task successivo

Invia taskId e customId, quindi salva il nuovo id task restituito.
2

Esegui il polling del nuovo task

Interroga di nuovo Fetch Single Task finché l’azione non termina.
3

Gestisci le azioni solo modal

Se il nuovo task raggiunge MODAL, continua con Modal per fornire l’input aggiuntivo.

Autorizzazioni

Authorization
string
header
obbligatorio

Bearer token authentication. Use your CometAPI key.

Corpo

application/json
customId
string
obbligatorio

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

taskId
string
obbligatorio

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.

Risposta

200 - application/json

Action task accepted.

code
integer
obbligatorio
description
string
obbligatorio
result
string
obbligatorio

New Midjourney task id created for the action.

properties
object