跳轉到主要內容
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 header,例如 2024-11-06
  • 提供穩定的來源 video URL
  • 使用 model: gen4
  • 在進一步加強風格轉換效果之前,先從較保守的 structure_transformation 值開始

任務流程

1

提交重新風格化任務

傳送來源影片、prompt 和選項,然後儲存回傳的 task id。
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