Skip to main content
POST
cURL
Gebruik dit endpoint om de hoofdworkflow van Midjourney te starten. Elke latere stap, waaronder 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 deze niet de HTTP-stijl 200 heeft

Kernworkflow

1

Dien de imagine-taak in

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

Poll tot de taak is voltooid

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

Ga verder met nabewerking

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

Optioneel video-promptpatroon

Als je beweging wilt vanuit een bronafbeelding, voeg dan een image URL plus Midjourney-videoflags 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

Submission status code. 1 = submitted successfully (result carries the task id). 21 = the action opened a confirmation modal; continue with /mj/submit/modal using the returned task id. 4 = parameter error; description explains the cause.

description
string
vereist
result
string
vereist

Task id returned after submission.

properties
object