Langsung ke konten utama
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>"
  }
}
Gunakan endpoint ini setelah task Midjourney mengembalikan tombol aksi. Endpoint ini memulai task turunan baru seperti upscale, variation, reroll, zoom, atau pan.

Anda memerlukan dua nilai

  • taskId dari task Midjourney asli atau yang terbaru
  • customId dari array buttons terbaru yang dikembalikan oleh Fetch Single Task
customId tidak bersifat tetap. Jangan pernah melakukan hardcode padanya. Selalu baca nilainya dari respons polling terbaru.

Aksi umum

  • U1 hingga U4: upscale satu gambar dari grid
  • V1 hingga V4: menghasilkan variation dari satu posisi gambar
  • Reroll: menghasilkan ulang seluruh grid
  • Zoom dan Pan: memperluas komposisi yang sudah ada

Setelah Anda mengirim sebuah aksi

1

Buat task lanjutan

Kirim taskId dan customId, lalu simpan id task baru yang dikembalikan.
2

Poll task baru

Lakukan query Fetch Single Task lagi hingga aksi selesai.
3

Tangani aksi khusus modal

Jika task baru mencapai MODAL, lanjutkan dengan Modal untuk memberikan input tambahan.

Otorisasi

Authorization
string
header
wajib

Bearer token authentication. Use your CometAPI key.

Body

application/json
customId
string
wajib

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

taskId
string
wajib

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
wajib
description
string
wajib
result
string
wajib

New Midjourney task id created for the action.

properties
object