Naar hoofdinhoud gaan
POST
/
mj
/
submit
/
imagine
Create a Midjourney imagine task
curl --request POST \
  --url https://api.cometapi.com/mj/submit/imagine \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "prompt": "a paper boat floating on calm water at sunrise --v 6.1"
}
'
{
  "code": 1,
  "description": "Submission successful",
  "result": "1773314942177684",
  "properties": {
    "discordChannelId": "5e6ca8e1f40e4de6",
    "discordInstanceId": "5e6ca8e1f40e4de6"
  }
}

Documentation Index

Fetch the complete documentation index at: https://apidoc.cometapi.com/llms.txt

Use this file to discover all available pages before exploring further.

Gebruik dit endpoint om de hoofdworkflow van Midjourney te starten. Elke latere stap, inclusief upscale, variation en custom zoom, begint met een succesvolle imagine-taak.

Wat de eerste response je geeft

  • result is de task id die je hierna gaat pollen
  • code kan nog steeds een succescode zijn, zelfs wanneer het geen HTTP-stijl 200 is

Kernworkflow

1

Verstuur de imagine-taak

Stuur de prompt en sla de geretourneerde task id op.
2

Poll totdat de taak is voltooid

Gebruik Fetch Single Task totdat de taak SUCCESS, MODAL of FAILURE bereikt.
3

Ga verder met post-processing

Wanneer knoppen verschijnen, gebruik je Action voor upscale, variation, reroll, zoom en vergelijkbare vervolgacties.

Optioneel video prompt-patroon

Als je beweging uit een bronafbeelding wilt, voeg dan een image URL plus Midjourney video-flags toe aan de prompt, zoals --video en --motion.

Autorisaties

Authorization
string
header
vereist

Bearer token authentication. Use your CometAPI key.

Body

application/json
prompt
string
vereist

Text prompt for the generation. Supports standard Midjourney parameters such as --v, --ar, --stylize, etc.

Voorbeeld:

"a paper boat floating on calm water at sunrise --v 6.1"

botType
enum<string>
standaard:MID_JOURNEY

Bot type to use. MID_JOURNEY for Midjourney (default), NIJI_JOURNEY for Niji.

Beschikbare opties:
MID_JOURNEY,
NIJI_JOURNEY
accountFilter
object

Filter which Midjourney account modes may be used for this task.

base64Array
string[]

Base64-encoded reference images. Each item should be a data URI such as data:image/png;base64,xxx.

state
string

Custom state string. Returned as-is in the task result and webhook callback for your own tracking.

Respons

200 - application/json

Task accepted.

code
integer
vereist
description
string
vereist
result
string
vereist

Task id returned after submission.

properties
object