الانتقال إلى المحتوى الرئيسي
POST
/
runway
/
pro
/
video2video
Video to Video Style Redraw
curl --request POST \
  --url https://api.cometapi.com/runway/pro/video2video \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "callback_url": "http://baidu.com",
  "video": "http://runwaycdn.rixapi.com/attachments/video/runway/20241015/82bc23c83b5c32e75059c8328df5cffb.mp4",
  "model": "gen4",
  "prompt": "pixelated style",
  "options": {
    "structure_transformation": 0.5,
    "flip": true
  }
}
'
{
  "code": 123,
  "msg": "<string>",
  "data": {
    "task_id": "<string>",
    "state": "<string>",
    "status": "<string>",
    "prompt": "<string>",
    "prompt_en": "<string>",
    "video_url": "<string>",
    "last_frame": "<string>",
    "msg": "<string>",
    "create_time": "<string>",
    "update_time": "<string>",
    "poster": "<string>"
  },
  "exec_time": 123
}
استخدم نقطة النهاية هذه لإعادة تنسيق فيديو موجود من خلال غلاف Runway ذي التنسيق العكسي.

قبل استدعائها

  • أرسل ترويسة X-Runway-Version المطلوبة، على سبيل المثال 2024-11-06
  • وفّر رابط URL ثابتًا للمصدر video
  • استخدم model: gen4
  • ابدأ بقيمة معتدلة لـ structure_transformation قبل زيادة شدة نقل النمط

تدفق المهمة

1

إرسال مهمة إعادة التنسيق

أرسل فيديو المصدر، وPrompt، والخيارات، ثم احفظ معرّف المهمة المُعاد.
2

التحقق من حالة المهمة

تابع باستخدام Feed Get Task حتى يصل الغلاف إلى حالة نهائية.
3

تخزين الإخراج النهائي

انسخ الإخراج النهائي إلى مساحة التخزين الخاصة بك إذا كنت بحاجة إليه بعد انتهاء نافذة التسليم الخاصة بالمزوّد.

التفويضات

Authorization
string
header
مطلوب

Bearer token authentication. Use your CometAPI key.

الترويسات

X-Runway-Version
string

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

الجسم

application/json
callback_url
string
افتراضي:https://example.com/webhook
مطلوب

Webhook URL that receives a POST request with the result when the task completes.

video
string
افتراضي:http://runwaycdn.rixapi.com/attachments/video/runway/20241015/82bc23c83b5c32e75059c8328df5cffb.mp4
مطلوب

URL of the source video to restyle.

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

Model version to use, e.g. gen4.

prompt
string
افتراضي:Apply a pixel-art redraw style.
مطلوب

Text prompt describing the target style for the redraw.

options
object
مطلوب

Additional processing options.

الاستجابة

200 - application/json

OK

code
integer
مطلوب

HTTP status code, 200 indicates success

msg
string
مطلوب

Return information, describes the request result

data
object
مطلوب

Specific response data

exec_time
number
مطلوب

Time spent by the server to process this request