Langsung ke konten utama
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": "提交成功",
  "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.

Gunakan endpoint ini untuk memulai alur kerja utama Midjourney. Setiap langkah berikutnya, termasuk upscale, variation, dan custom zoom, dimulai dari task imagine yang berhasil.

Apa yang diberikan oleh respons pertama

  • result adalah id task yang akan Anda poll selanjutnya
  • code tetap bisa berupa kode sukses meskipun bukan 200 bergaya HTTP

Alur kerja inti

1

Submit the imagine task

Kirim prompt dan simpan id task yang dikembalikan.
2

Poll until the task finishes

Gunakan Fetch Single Task hingga task mencapai SUCCESS, MODAL, atau FAILURE.
3

Continue with post-processing

Saat tombol muncul, gunakan Action untuk upscale, variation, reroll, zoom, dan operasi lanjutan serupa.

Pola prompt video opsional

Jika Anda ingin gerakan dari gambar sumber, tambahkan URL gambar beserta flag video Midjourney di dalam prompt, seperti --video dan --motion.

Otorisasi

Authorization
string
header
wajib

Bearer token authentication. Use your CometAPI key.

Body

application/json
prompt
string
wajib

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

Contoh:

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

botType
enum<string>
default:MID_JOURNEY

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

Opsi yang tersedia:
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
wajib
description
string
wajib
result
string
wajib

Task id returned after submission.

properties
object