跳转到主要内容
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
  • 提供稳定的源 video URL
  • 使用 model: gen4
  • 在进一步增强风格迁移效果之前,先从较低的 structure_transformation 值开始

任务流程

1

提交重绘任务

发送源视频、prompt 和相关选项,然后保存返回的任务 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