跳转到主要内容
POST
/
runwayml
/
v1
/
video_to_video
Generate a video from a video
curl --request POST \
  --url https://api.cometapi.com/runwayml/v1/video_to_video \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'X-Runway-Version: <x-runway-version>' \
  --data '
{
  "videoUri": "https://filesystem.site/cdn/20250818/c4gCDVPhiBc6TomRTJ7zNg0KwO1PSJ.mp4",
  "promptText": "string",
  "seed": 4294967295,
  "model": "gen4_aleph",
  "references": [
    {
      "type": "image",
      "uri": "https://cdn.britannica.com/70/234870-050-D4D024BB/Orange-colored-cat-yawns-displaying-teeth.jpg"
    }
  ],
  "ratio": "1280:720",
  "contentModeration": {
    "publicFigureThreshold": "auto"
  }
}
'
{}
使用此端点可通过 Runway 的视频转视频工作流转换现有源视频片段。它会启动异步任务,而不是立即返回最终输出。

调用前准备

  • 准备一个符合提供方输入要求的源视频
  • 包含所需的 X-Runway-Version 请求头,以启用你想要的功能集
  • 从一个简短的 Prompt 开始,用于描述变更,而不是完整分镜

任务流程

1

提交源视频片段和 Prompt

通过此端点启动任务,并保存返回的任务 id。
2

轮询任务详情

使用 Runway 获取任务详情,直到任务进入终态。
3

存储转换结果

通过你常规的媒体处理流程下载或持久化已完成的资源。

CometAPI 封装说明

CometAPI 保留了 Runway 的异步任务模型和版本化请求行为,同时统一了鉴权和 base URL 处理方式,使其与平台其余部分保持一致。

授权

Authorization
string
header
必填

Bearer token authentication. Use your CometAPI key.

请求头

X-Runway-Version
string
必填

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

请求体

application/json
videoUri
string
默认值:https://filesystem.site/cdn/20250818/c4gCDVPhiBc6TomRTJ7zNg0KwO1PSJ.mp4
必填

HTTPS URL of the source video, or a base64 data URI containing the video.

promptText
string
默认值:A cat yawning in slow motion.
必填

Text prompt describing the desired output. Maximum 1000 characters.

seed
integer
默认值:1
必填

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

model
string
默认值:gen4_aleph
必填

Model variant to use.

references
object[]
必填

Optional reference images to guide generation. Each item must include type (e.g. image) and uri (HTTPS URL).

ratio
string
默认值:1280:720
必填

Aspect ratio of the output video, e.g. 1280:720.

contentModeration
object
必填

响应

200 - application/json

success

The response is of type object.