الانتقال إلى المحتوى الرئيسي
POST
cURL
استخدم gen4.5 لإنشاء فيديو من Prompt نصي. أرسل مفتاح CometAPI API باستخدام مصادقة Bearer ونص طلب JSON.

إعداد الطلب

  • اضبط model على gen4.5.
  • صِف المشهد والحركة في promptText باستخدام ما بين 1 و1,000 وحدة ترميز UTF-16.
  • اضبط ratio على 1280:720 للوضع الأفقي أو 720:1280 للوضع العمودي.
  • اضبط duration على عدد صحيح من 2 إلى 10 ثانية.
الحقول الأربعة كلها مطلوبة. للبدء من صورة، استخدم إنشاء مهمة Runway لتحويل الصورة إلى فيديو. لا تضمّن promptImage أو مفتاح تبديل audio في طلب تحويل النص إلى فيديو هذا.

ضبط عناصر التحكم الاختيارية

لإدخال قيمة seed صريحة، استخدم 1 حتى 4294967295. ويؤدي حذفها أو استخدام 0 إلى اختيار seed عشوائي. إذا ضمّنت contentModeration، فاضبط قيمته publicFigureThreshold على auto أو low؛ وإلا فاحذف الكائن. استخدم outputFormat لاختيار MP4 أو ProRes أو تسلسلات PNG أو أحد تنسيقات HDR المدرجة في مخطط الطلب. احذفه لاستخدام H.264 MP4. يمكنك ضبطه proresProfile فقط عندما يكون outputFormat هو prores أو hdr_prores. يقبل تنسيق HDR ProRes القيم 422 أو 422 HQ أو 4444.

استرداد النتيجة

احفظ id المُعاد واستخدم الحصول على مهمة Runway. عندما تكون قيمة status هي SUCCEEDED، اقرأ عناوين URL للفيديو في output.

التفويضات

Authorization
string
header
مطلوب

Use your CometAPI API key.

الجسم

application/json

Request parameters for gen4.5.

model
enum<string>
مطلوب

Model ID for this request variant.

الخيارات المتاحة:
gen4.5
Allowed value: "gen4.5"
promptText
string
مطلوب

Describe the requested scene or motion in 1 to 1,000 UTF-16 code units.

Required string length: 1 - 1000
ratio
enum<string>
مطلوب

Requested output dimensions, expressed as width:height. Choose a value listed for this model and endpoint.

الخيارات المتاحة:
1280:720,
720:1280
duration
integer
مطلوب

Requested video duration in whole seconds, from 2 through 10.

النطاق المطلوب: 2 <= x <= 10
seed
integer

Optional sampling seed. Use a positive integer for an explicit seed. Omission or 0 selects a random seed.

النطاق المطلوب: 0 <= x <= 4294967295
contentModeration
object

Optional content moderation settings. Omit the object to use standard moderation.

outputFormat
enum<string>
مطلوب if proresProfile is set

Output encoding. Omit for mp4 (H.264). prores returns MOV; png_sequence returns a PNG ZIP; sdr_rec709_10bit returns 10-bit Rec.709 HEVC. hdr10 and hlg return 10-bit HDR MP4; hdr_pq_12bit_master returns 12-bit HEVC MOV; hdr_prores returns HDR ProRes MOV. The HDR PNG/EXR sequence formats return ZIP archives; the ACEScg variants target the named ACES version.

الخيارات المتاحة:
mp4,
prores,
png_sequence,
hdr10,
hlg,
sdr_rec709_10bit,
hdr_pq_12bit_master,
hdr_prores,
hdr_png_sequence,
hdr_exr_sequence,
hdr_exr_acescg_sequence_1_3,
hdr_exr_acescg_sequence_2_0
proresProfile
enum<string>

Profile for outputFormat prores or hdr_prores. Omit for 4444 with prores, or 422 HQ with hdr_prores. hdr_prores accepts only 422, 422 HQ, or 4444. Omit this field for other formats.

الخيارات المتاحة:
422,
4444,
422 Proxy,
422 LT,
422 HQ,
4444 XQ

الاستجابة

Task submitted. Save its id to retrieve task status.

id
string
مطلوب

Task ID for GET /runwayml/v1/tasks/{id}.

status
string

Task state, when returned.

createdAt
string<date-time>

Task submission timestamp, when returned.

output
string<uri>[]

Result URLs, when returned.

failure
string

Failure explanation, when returned.

failureCode
string

Machine-readable failure code, when returned.

estimatedCost
object

Task estimate metadata, when returned.

cost
object

Task cost metadata, when returned.

آخر تعديل في ٢١ سبتمبر ٢٠٢٦