إنشاء مهمة Runway لتحويل صورة إلى فيديو
استخدم CometAPI لاستدعاء Runway image_to_video وتحويل رابط صورة ثابتة إلى إخراج فيديو خام، مع دعم X-Runway-Version للتوافق.
قبل استدعائها
- أرسل ترويسة
X-Runway-Versionالمطلوبة، على سبيل المثال2024-11-06 - استخدم
model: gen3a_turbo - وفّر
promptImageثابتًا عبر HTTPS - ابدأ بـ
duration: 5وقيمة ratio مدعومة للنموذج/الإصدار المحدد من Runway
Duration و ratio
ratio وليس size. اقرأ قيم ratio بنمط الدقة على أنها مكافئ WxH لها: تستهدف 1280:720 الدقة 1280x720، وتستهدف 720:1280 الدقة 720x1280، ويمكن أن يتم عرض 1280:768 أيضًا على شكل 1280x720 بحسب النموذج/الإصدار المحدد.
تدفق المهمة
أرسل طلب تحويل الصورة إلى فيديو
خزّن id المُعاد
id الخاص بالمهمة لاستخدامه لاحقًا في polling.استطلع حالة المهمة
task_not_exist، فانتظر بضع ثوانٍ ثم أعد المحاولة.التفويضات
Bearer token authentication. Use your CometAPI key.
الترويسات
Runway version header, for example 2024-11-06.
الجسم
Source image URL.
Runway image-to-video model ID. Choose an available model from the Models page.
Random seed for reproducible results. Range: 0–999999999.
Text prompt describing the desired motion or scene. Maximum 512 characters.
Whether to add a watermark to the output video.
Video duration in seconds. Runway support is model/version dependent; use 5 or 10 for the broadest compatibility. CometAPI forwards this value to Runway.
Requested output ratio. Accepted values are Runway model/version dependent. With X-Runway-Version 2024-11-06, use a resolution-style value accepted by the selected model, such as 1280:768, 768:1280, 1280:720, or 720:1280. Read these as WxH targets, but completed media may normalize, so inspect the returned file before relying on exact pixels.
الاستجابة
Task accepted.