Skip to main content
POST
استخدم نقطة النهاية هذه لسير عمل Kling Omni المتوافق مع O1 والمكشوف عبر CometAPI، بما في ذلك إنشاء الفيديو من النص وإنشاء الفيديو بالاستناد إلى صورة الإطار الأول.
للاطلاع على المرجع الكامل لمعاملات المزوّد، راجع وثائق Kling Omni Video.

اختر وضع الإدخال

  • من النص إلى فيديو: أرسل prompt وmode وaspect_ratio وduration
  • مرجع صورة الإطار الأول: أضف عناصر image_list مع image_url وtype: first_frame، ثم أشر إلى الصورة في prompt بصيغة <<<image_1>>>
  • مخرجات بعلامة مائية: أضف watermark_info.enabled: true عندما تحتاج إلى عنوان URL لفيديو بعلامة مائية في استجابة الاستعلام
  • model ID: احذف model_name لاستخدام القيمة الافتراضية للمسار، أو أرسل model ID مُختبَرًا لـ Omni Video مثل kling-video-o1 أو kling-v3-omni

المدة ونسبة العرض إلى الارتفاع

لا يوفّر Kling Omni حقل size دقيقًا. تعامل مع aspect_ratio على أنه طلب لشكل الإطار؛ إذ يمكن أن يُعرَض طلب تحويل النص إلى فيديو بنسبة 16:9 بدقة Full HD 1920x1080.

تدفق المهمة

1

إنشاء مهمة Omni

أرسل الطلب وخزّن task_id المُعاد.
2

استطلع مهمة Omni

تابع باستخدام الحصول على فيديو Kling Omni حتى تكتمل المهمة.
3

احفظ الفيديو المكتمل

انقل عنوان URL لملف MP4 المُعاد إلى مساحة التخزين الخاصة بك إذا كنت تحتاج إلى وصول دائم.

التفويضات

Authorization
string
header
مطلوب

Bearer token authentication. Use your CometAPI key.

الترويسات

Content-Type
string

Content type of the request body.

الجسم

application/json
prompt
string
مطلوب

Text prompt describing the desired video. Maximum length is 2,500 characters. When you send image_list, reference the image with <<<image_1>>>.

model_name
string

Optional model ID for this Kling Omni video request. Omit this field to use the route default.

image_list
object[]

Optional first-frame image reference for image-referenced Omni generation.

sound
enum<string>
افتراضي:off

Whether to generate audio with the video. Use on or off.

الخيارات المتاحة:
on,
off
mode
enum<string>

Generation mode. Use std for standard generation or pro when the selected model supports the higher-quality mode.

الخيارات المتاحة:
std,
pro
aspect_ratio
enum<string>

Aspect ratio request for beta Kling Omni generation. The endpoint does not expose an exact size field; a 16:9 text-to-video request can render as 1920x1080.

الخيارات المتاحة:
16:9,
9:16,
1:1
duration
enum<string>
افتراضي:5

Requested output length for text-to-video and first-frame image-reference workflows. Use 5 or 10 as a string.

الخيارات المتاحة:
5,
10
watermark_info
object

Watermark options. When enabled is true, the task can return watermarked result URLs in addition to original result URLs.

callback_url
string<uri>

Webhook URL for task status notifications. The server sends a callback when the task status changes.

external_task_id
string

Optional user-defined task ID for your own tracking. Does not replace the system-generated task ID. Must be unique per account.

الاستجابة

200 - application/json

Success

code
integer
مطلوب

Response code. 0 means the task request was accepted.

message
string
مطلوب

Response message.

data
object
مطلوب
request_id
string

Request identifier returned by CometAPI when present.