الانتقال إلى المحتوى الرئيسي
POST
/
mj
/
submit
/
action
Create a Midjourney follow-up action task
curl --request POST \
  --url https://api.cometapi.com/mj/submit/action \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customId": "MJ::JOB::variation::3::example",
  "taskId": "1773314942177684"
}
'
{
  "code": 123,
  "description": "<string>",
  "result": "<string>",
  "properties": {
    "numberOfQueues": 123,
    "discordInstanceId": "<string>",
    "discordChannelId": "<string>"
  }
}
استخدم نقطة النهاية هذه بعد أن تُرجع مهمة Midjourney أزرار الإجراءات. وهي تبدأ مهمة لاحقة جديدة مثل upscale أو variation أو reroll أو zoom أو pan.

أنت بحاجة إلى قيمتين

  • taskId من مهمة Midjourney الأصلية أو الأحدث
  • customId من أحدث مصفوفة buttons المُعادة بواسطة Fetch Single Task
customId غير ثابت. لا تقم بتضمينه بشكل ثابت أبدًا. اقرأه دائمًا من أحدث استجابة polling.

الإجراءات الشائعة

  • U1 إلى U4: تنفيذ upscale لصورة واحدة من الشبكة
  • V1 إلى V4: إنشاء variations من موضع صورة واحد
  • Reroll: إعادة توليد الشبكة بالكامل
  • Zoom وPan: توسيع التكوين الحالي

بعد إرسال إجراء

1

إنشاء المهمة اللاحقة

أرسل taskId وcustomId، ثم خزّن معرّف المهمة الجديد المُعاد.
2

إجراء polling للمهمة الجديدة

استعلم عن Fetch Single Task مرة أخرى حتى ينتهي الإجراء.
3

التعامل مع الإجراءات التي تتطلب modal فقط

إذا وصلت المهمة الجديدة إلى MODAL، فتابع باستخدام Modal لتوفير الإدخال الإضافي.

التفويضات

Authorization
string
header
مطلوب

Bearer token authentication. Use your CometAPI key.

الجسم

application/json
customId
string
مطلوب

Action id taken from the latest buttons array returned by the fetch endpoint.

taskId
string
مطلوب

Midjourney task id you want to continue from.

state
string

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

enableRemix
boolean

Whether to force remix mode when the current action supports it.

chooseSameChannel
boolean

Whether to prefer the same channel account used by the current task.

الاستجابة

200 - application/json

Action task accepted.

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

New Midjourney task id created for the action.

properties
object