Zum Hauptinhalt springen
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.

Verwenden Sie diesen Endpunkt, um den zentralen Midjourney-Workflow zu starten. Jeder spätere Schritt, einschließlich Upscale, Variation und benutzerdefiniertem Zoom, beginnt mit einem erfolgreichen Imagine-Task.

Was Ihnen die erste Antwort liefert

  • result ist die task id, die Sie als Nächstes abfragen werden
  • code kann weiterhin ein Erfolgscode sein, auch wenn es kein HTTP-artiges 200 ist

Kern-Workflow

1

Imagine-Task übermitteln

Senden Sie den Prompt und speichern Sie die zurückgegebene task id.
2

Abfragen, bis der Task abgeschlossen ist

Verwenden Sie Fetch Single Task, bis der Task SUCCESS, MODAL oder FAILURE erreicht.
3

Mit der Nachbearbeitung fortfahren

Wenn Schaltflächen erscheinen, verwenden Sie Action für Upscale, Variation, Reroll, Zoom und ähnliche Folgeoperationen.

Optionales Video-Prompt-Muster

Wenn Sie Bewegung aus einem Quellbild erzeugen möchten, fügen Sie dem Prompt eine Bild-URL sowie Midjourney-Video-Flags wie --video und --motion hinzu.

Autorisierungen

Authorization
string
header
erforderlich

Bearer token authentication. Use your CometAPI key.

Body

application/json
prompt
string
erforderlich

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

Beispiel:

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

botType
enum<string>
Standard:MID_JOURNEY

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

Verfügbare Optionen:
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.

Antwort

200 - application/json

Task accepted.

code
integer
erforderlich
description
string
erforderlich
result
string
erforderlich

Task id returned after submission.

properties
object