الانتقال إلى المحتوى الرئيسي
POST
/
runwayml
/
v1
/
image_to_video
Create a Runway image-to-video task
curl --request POST \
  --url https://api.cometapi.com/runwayml/v1/image_to_video \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Runway-Version: <x-runway-version>' \
  --data '
{
  "promptImage": "https://cdn.britannica.com/70/234870-050-D4D024BB/Orange-colored-cat-yawns-displaying-teeth.jpg",
  "model": "gen3a_turbo"
}
'
{
  "id": "3d957031-9a2a-45e2-9dc7-bc8513059c50"
}
استخدم نقطة النهاية هذه لتحريك صورة مصدر واحدة إلى فيديو Runway.

قبل الاستدعاء

  • أرسل ترويسة X-Runway-Version المطلوبة، على سبيل المثال 2024-11-06
  • استخدم model: gen3a_turbo
  • وفّر promptImage ثابتًا عبر HTTPS
  • ابدأ بـ duration: 5 ونسبة شائعة مثل 1280:720

سير المهمة

1

إرسال طلب تحويل الصورة إلى فيديو

أنشئ المهمة باستخدام صورة مصدر ووصف حركة قصير اختياري.
2

تخزين id المُعاد

احفظ id الخاص بالمهمة لاستخدامه لاحقًا في الاستعلام.
3

الاستعلام عن حالة المهمة

استخدم Get Task Details. إذا أعادت أول عملية استعلام task_not_exist، فانتظر بضع ثوانٍ ثم أعد المحاولة.

التفويضات

Authorization
string
header
مطلوب

Bearer token authentication. Use your CometAPI key.

الترويسات

X-Runway-Version
string
مطلوب

Runway version header, for example 2024-11-06.

الجسم

application/json
promptImage
string
افتراضي:https://cdn.britannica.com/70/234870-050-D4D024BB/Orange-colored-cat-yawns-displaying-teeth.jpg
مطلوب

Source image URL.

model
string
افتراضي:gen3a_turbo
مطلوب

Runway image-to-video model ID. Choose a current model from the Models page.

seed
integer

Random seed for reproducible results. Range: 0–999999999.

promptText
string

Text prompt describing the desired motion or scene. Maximum 512 characters.

watermark
boolean
افتراضي:false

Whether to add a watermark to the output video.

duration
integer
افتراضي:5

Video duration in seconds. Accepted values: 5 or 10.

ratio
enum<string>
افتراضي:1280:720

Aspect ratio of the output video.

الخيارات المتاحة:
1280:720,
720:1280,
1104:832,
832:1104,
960:960,
1584:672,
1280:768,
768:1280

الاستجابة

200 - application/json

Task accepted.

id
string
مطلوب