跳转到主要内容
POST
使用此端点为源图像添加动画。请通过 Bearer 身份验证发送您的 CometAPI API 密钥,并使用 JSON 请求正文。

选择模型

对于纯文本请求,请使用 创建 Runway 文本转视频任务.

提供首帧

将 promptImage 设置为可访问的 HTTPS 图像 URL 或 Base64 图像数据 URI。 您还可以提供一个仅含 uri 和 position: "first" 的单项数组。 此接口接受一个起始帧;请勿添加末帧条目。 HTTPS 图像必须可直接访问且无需重定向,并具有有效的 图像内容标头。编码后的图像数据 URI 最大可为 5 MB。请参阅 Runway 媒体输入要求 以了解图像格式和尺寸。

设置时长和尺寸

使用从 duration 到 2 秒的整数 10。该字段对于 gen4.5 为必填项,对于 gen4_turbo 为可选项。 将 ratio 设置为 1280:720、720:1280、1104:832、960:960、832:1104 或 1584:672。这些是以冒号分隔的宽度和高度值。 如需指定采样种子,请使用 1 到 4294967295。省略该字段或使用 0 会选择随机种子。如果包含 contentModeration,请将其 publicFigureThreshold 设置为 auto 或 low;否则请省略该对象。

选择输出格式

gen4.5 接受 outputFormat,用于 MP4、ProRes、PNG 序列以及 HDR 格式,这些格式列于请求架构中。若使用 H.264 MP4,请省略该字段。 proresProfile 仅适用于 prores 和 hdr_prores;其允许的值 取决于所选格式。使用 gen4_turbo 时请省略这两个字段。

获取结果

保存返回的 id,然后使用 获取 Runway 任务. 当 status 为 SUCCEEDED 时,请从 output 中读取结果 URL。

授权

Authorization
string
header
必填

Use your CometAPI API key.

请求体

application/json

Request parameters for gen4.5.

model
enum<string>
必填

Model ID for this request variant.

可用选项:
gen4.5
Allowed value: "gen4.5"
promptText
string
必填

Describe the requested scene or motion in 1 to 1,000 UTF-16 code units.

Required string length: 1 - 1000
promptImage
必填

Image to use as the first frame. Supply a media URI or a one-item array with position set to first.

Maximum string length: 2048
Pattern: ^https://
ratio
enum<string>
必填

Requested output dimensions, expressed as width:height. Choose a value listed for this model and endpoint.

可用选项:
1280:720,
720:1280,
1104:832,
960:960,
832:1104,
1584:672
duration
integer
必填

Requested video duration in whole seconds, from 2 through 10.

必填范围: 2 <= x <= 10
seed
integer

Optional sampling seed. Use a positive integer for an explicit seed. Omission or 0 selects a random seed.

必填范围: 0 <= x <= 4294967295
contentModeration
object

Optional content moderation settings. Omit the object to use standard moderation.

outputFormat
enum<string>
必填 if proresProfile is set

Output encoding. Omit for mp4 (H.264). prores returns MOV; png_sequence returns a PNG ZIP; sdr_rec709_10bit returns 10-bit Rec.709 HEVC. hdr10 and hlg return 10-bit HDR MP4; hdr_pq_12bit_master returns 12-bit HEVC MOV; hdr_prores returns HDR ProRes MOV. The HDR PNG/EXR sequence formats return ZIP archives; the ACEScg variants target the named ACES version.

可用选项:
mp4,
prores,
png_sequence,
hdr10,
hlg,
sdr_rec709_10bit,
hdr_pq_12bit_master,
hdr_prores,
hdr_png_sequence,
hdr_exr_sequence,
hdr_exr_acescg_sequence_1_3,
hdr_exr_acescg_sequence_2_0
proresProfile
enum<string>

Profile for outputFormat prores or hdr_prores. Omit for 4444 with prores, or 422 HQ with hdr_prores. hdr_prores accepts only 422, 422 HQ, or 4444. Omit this field for other formats.

可用选项:
422,
4444,
422 Proxy,
422 LT,
422 HQ,
4444 XQ

响应

Task submitted. Save its id to retrieve task status.

id
string
必填

Task ID for GET /runwayml/v1/tasks/{id}.

status
string

Task state, when returned.

createdAt
string<date-time>

Task submission timestamp, when returned.

output
string<uri>[]

Result URLs, when returned.

failure
string

Failure explanation, when returned.

failureCode
string

Machine-readable failure code, when returned.

estimatedCost
object

Task estimate metadata, when returned.

cost
object

Task cost metadata, when returned.

最后修改于 2026年9月22日