Skip to main content
POST
cURL
استخدم نقطة النهاية هذه لإنشاء مهمة Vidu Q3 لتحويل النص إلى فيديو. تعيد واجهة API معرّف المهمة فورًا، لذا خزّن قيمة id المُعادة واستطلع المهمة حتى تصل إلى حالة نهائية. يستخدم POST /v1/videos النوع multipart/form-data؛ مرّر عناصر التحكم القيمية كحقول نموذج.

اختر نموذجًا

تعيين المدة والحجم

اضبط size على إحدى قيم WxH أدناه.

تدفق المهمة

1

إنشاء المهمة

أرسل طلب النموذج متعدد الأجزاء وخزّن قيمة id المُعادة.
2

استطلاع المهمة

استدعِ استرجاع فيديو Vidu حتى تصبح status هي completed أو failed أو error.
3

تنزيل النتيجة

عندما تكون المهمة completed، استدعِ استرجاع محتوى فيديو Vidu لتنزيل ملف MP4.

التفويضات

Authorization
string
header
مطلوب

Bearer authentication. Use your CometAPI API key.

الجسم

multipart/form-data
model
enum<string>
مطلوب

Vidu Q3 model ID for this endpoint.

الخيارات المتاحة:
viduq3-turbo,
viduq3
مثال:

"viduq3-turbo"

prompt
string
مطلوب

Text prompt that describes the video to generate.

مثال:

"An astronaut walks through soft blue fog with a slow cinematic camera move."

seconds
string

Requested clip duration in seconds. Use an integer from 1 through 16. Default is 5.

مثال:

"1"

size
string

Supported WxH size values: 640x352, 960x528, 1280x720, 1920x1080. Default is 1280x720.

الاستجابة

Task created. Store the returned id and poll GET /v1/videos/{task_id}.

id
string
مطلوب

Task ID. Use this value with retrieve and content endpoints.

مثال:

"task_example"

object
string
مطلوب

Object type. Video tasks return video.

مثال:

"video"

model
string
مطلوب

Model ID used for the task.

مثال:

"viduq3-turbo"

status
enum<string>
مطلوب

Task lifecycle status. Poll until the value is completed, failed, or error.

الخيارات المتاحة:
queued,
in_progress,
completed,
failed,
error
مثال:

"queued"

progress
integer
مطلوب

Task progress as a coarse percentage.

النطاق المطلوب: 0 <= x <= 100
مثال:

0

created_at
integer
مطلوب

Task creation time as a Unix timestamp in seconds.

مثال:

1779938152

task_id
string

Compatibility alias for id when present.

مثال:

"task_example"

completed_at
integer

Task completion time as a Unix timestamp in seconds. This field appears on completed tasks.

مثال:

1779938219

video_url
string

Temporary video delivery URL. This field appears on completed tasks.

مثال:

"<temporary-video-url>"

error
object

Failure details. This field appears when the task fails.