Bruk CometAPI POST /mj/submit/action for å bruke Midjourney-handlinger—upscale, variation, reroll, zoom og mer—på bilder generert via imaging.
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>"
}
}taskId fra den opprinnelige eller nyeste Midjourney-oppgavencustomId fra den nyeste buttons-arrayen som returneres av Fetch Single TaskcustomId er ikke stabil. Hardkod den aldri. Les den alltid fra den nyeste polling-responsen.U1 til U4: upscale ett bilde fra rutenettetV1 til V4: generer variasjoner fra én bildeposisjonOpprett oppfølgingsoppgaven
taskId og customId, og lagre deretter den nye returnerte oppgave-id-en.Poll den nye oppgaven
Håndter handlinger som kun bruker modal
MODAL, fortsett med Modal for å oppgi ekstra inndata.Bearer token authentication. Use your CometAPI key.
Action id taken from the latest buttons array returned by the fetch endpoint.
Midjourney task id you want to continue from.
Custom state string. Returned as-is in the task result and webhook callback for your own tracking.
Whether to force remix mode when the current action supports it.
Whether to prefer the same channel account used by the current 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>"
}
}