Naar hoofdinhoud gaan
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>"
  }
}
Gebruik dit endpoint nadat een Midjourney-taak actieknoppen heeft teruggegeven. Het start een nieuwe vervolgtask, zoals upscale, variation, reroll, zoom of pan.

Je hebt twee waarden nodig

  • taskId van de oorspronkelijke of meest recente Midjourney-taak
  • customId uit de nieuwste buttons-array die wordt teruggegeven door Fetch Single Task
customId is niet stabiel. Hardcode het nooit. Lees het altijd uit de nieuwste polling-respons.

Veelvoorkomende acties

  • U1 tot U4: upscale één afbeelding uit het raster
  • V1 tot V4: genereer variaties vanaf één afbeeldingspositie
  • Reroll: genereer het volledige raster opnieuw
  • Zoom en Pan: breid de bestaande compositie uit

Nadat je een actie hebt ingediend

1

Maak de vervolgtask aan

Verstuur taskId en customId, en sla vervolgens de nieuw geretourneerde task-id op.
2

Poll de nieuwe task

Raadpleeg Fetch Single Task opnieuw totdat de actie is voltooid.
3

Verwerk acties die alleen modal zijn

Als de nieuwe task MODAL bereikt, ga dan verder met Modal om de extra invoer te leveren.

Autorisaties

Authorization
string
header
vereist

Bearer token authentication. Use your CometAPI key.

Body

application/json
customId
string
vereist

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

taskId
string
vereist

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.

Respons

200 - application/json

Action task accepted.

code
integer
vereist
description
string
vereist
result
string
vereist

New Midjourney task id created for the action.

properties
object