Saltar para o conteúdo 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>"
  }
}
Use este endpoint depois que uma tarefa do Midjourney retornar botões de ação. Ele inicia uma nova tarefa downstream, como upscale, variation, reroll, zoom ou pan.

Você precisa de dois valores

  • taskId da tarefa original ou mais recente do Midjourney
  • customId do array buttons mais recente retornado por Fetch Single Task
customId não é estável. Nunca o codifique manualmente. Sempre leia esse valor da resposta de polling mais recente.

Ações comuns

  • U1 a U4: faz upscale de uma imagem da grade
  • V1 a V4: gera variações a partir de uma posição da imagem
  • Reroll: regenera a grade completa
  • Zoom e Pan: expandem a composição existente

Depois de enviar uma ação

1

Criar a tarefa de acompanhamento

Envie taskId e customId e, em seguida, armazene o novo id de tarefa retornado.
2

Fazer polling da nova tarefa

Consulte Fetch Single Task novamente até que a ação seja concluída.
3

Lidar com ações somente de modal

Se a nova tarefa chegar a MODAL, continue com Modal para fornecer a entrada adicional.

Autorizações

Authorization
string
header
obrigatório

Bearer token authentication. Use your CometAPI key.

Corpo

application/json
customId
string
obrigatório

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

taskId
string
obrigatório

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.

Resposta

200 - application/json

Action task accepted.

code
integer
obrigatório
description
string
obrigatório
result
string
obrigatório

New Midjourney task id created for the action.

properties
object