الانتقال إلى المحتوى الرئيسي
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.

استخدم نقطة النهاية هذه لبدء سير عمل Midjourney الرئيسي. كل خطوة لاحقة، بما في ذلك upscale وvariation وcustom zoom، تبدأ بمهمة imagine ناجحة.

ماذا تمنحك الاستجابة الأولى

  • result هو معرّف المهمة الذي ستقوم باستطلاع حالته بعد ذلك
  • يمكن أن يكون code رمز نجاح حتى عندما لا يكون 200 بأسلوب HTTP

سير العمل الأساسي

1

إرسال مهمة imagine

أرسل Prompt وخزّن معرّف المهمة المُعاد.
2

إجراء الاستطلاع حتى تنتهي المهمة

استخدم Fetch Single Task حتى تصل المهمة إلى SUCCESS أو MODAL أو FAILURE.
3

المتابعة بالمعالجة اللاحقة

عند ظهور الأزرار، استخدم Action لتنفيذ upscale وvariation وreroll وzoom وعمليات المتابعة المشابهة.

نمط Prompt اختياري للفيديو

إذا كنت تريد حركة من صورة مصدر، فأضف عنوان URL للصورة مع إشارات الفيديو الخاصة بـ Midjourney داخل Prompt، مثل --video و--motion.

التفويضات

Authorization
string
header
مطلوب

Bearer token authentication. Use your CometAPI key.

الجسم

application/json
prompt
string
مطلوب

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

مثال:

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

botType
enum<string>
افتراضي:MID_JOURNEY

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

الخيارات المتاحة:
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.

الاستجابة

200 - application/json

Task accepted.

code
integer
مطلوب
description
string
مطلوب
result
string
مطلوب

Task id returned after submission.

properties
object