跳至正文
EN

Runway Video Generation API 接入文档

使用 VezAPI 密钥接入 Runway Video Generation。下列操作共用同一个账号余额和鉴权方式。

服务地址: https://api.vezapi.com
请求头使用 Authorization: Bearer YOUR_VEZAPI_KEY。每次提交使用唯一的 Idempotency-Key,查询同一笔提交时才复用。

延长AI视频

POST/api/v1/jobs/createTask

模型标识: runway/extend-ai-video

参数类型说明与限制
model
必填
string

模型名称

默认:"runway/extend-ai-video"

callBackUrl
可选
string

用于接收AI视频扩展任务完成更新的URL地址。所有视频扩展请求都需要此参数。 - 系统将在AI视频扩展完成时向此URL发送POST请求,包含任务状态和结果 - 回调包含扩展后的视频URL、封面图片和任务信息 - 您的回调端点应能接受包含扩展结果的JSON载荷的POST请求 - 详细的回调格式和实现指南,请参见 [视频扩展回调]([see VezAPI documentation]) - 也可轮询获取任务详情(/cn/market/common/get-task-detail)。 - 为确保回调安全性,请参阅 [Webhook 校验指南](/cn/common-api/webhook-verification) 了解签名验证实现方法

input
必填
object
input.task_id
必填
string

原始视频生成任务的唯一标识符。必须是来自先前生成视频的有效任务ID。

input.prompt
必填
string

指导视频续集的描述性文本。解释接下来应该发生什么动作、动态或发展。要具体但保持与原始视频内容的一致性。

input.quality
必填
string

视频分辨率,可选值为720p或1080p

input.watermark
可选
string

视频水印文本内容。空字符串表示不添加水印,非空字符串将在视频右下角显示指定的水印文本。

请求示例
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
  -H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
  -H 'Idempotency-Key: your-unique-request-id' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "runway/extend-ai-video",
  "input": {
    "task_id": "ee603959-debb-48d1-98c4-a6d1c717eba6",
    "prompt": "The cat continues dancing with more energy and excitement, spinning around with colorful light effects intensifying",
    "quality": "720p"
  }
}'
返回值与错误

HTTP 200

请求成功

参数类型说明与限制
code
可选
integer

Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying).

可选值:200, 401, 404, 422, 429, 451, 455, 500

msg
可选
string

Status message

data
可选
object
data.taskId
可选
string

Task ID for tracking task status. Use this ID with the "Get AI Video Details" endpoint to query extension task details and results.

HTTP 500

服务器错误

生成AI视频

POST/api/v1/jobs/createTask

模型标识: runway

参数类型说明与限制
model
必填
string

模型名称

默认:"runway"

callBackUrl
可选
string

用于接收AI视频生成任务完成更新的URL地址。所有视频生成请求都需要此参数。 - 系统将在AI视频生成完成时向此URL发送POST请求,包含任务状态和结果 - 回调包含生成的视频URL、封面图片和任务信息 - 您的回调端点应能接受包含视频结果的JSON载荷的POST请求 - 详细的回调格式和实现指南,请参见 [视频生成回调]([see VezAPI documentation]) - 也可轮询获取任务详情(/cn/market/common/get-task-detail)。 - 为确保回调安全性,请参阅 [Webhook 校验指南](/cn/common-api/webhook-verification) 了解签名验证实现方法

input
必填
object
input.prompt
必填
string

指导AI视频生成的描述性文本。具体说明主题、动作、风格和场景。当与图像一起使用时,描述如何为图像内容添加动画或修改。最大长度为1800个字符。

input.image_url
可选
string

可选的参考图像URL,作为视频的基础。提供后,AI将创建一个为此图像添加动画或扩展的视频。

input.duration
必填
number

视频时长,可选值为5或10。如果选10秒视频,则无法使用1080p分辨率

input.quality
必填
string

视频分辨率,可选值为720p或1080p。如果选择了1080p,则无法生成10秒的视频

input.aspect_ratio
可选
string

视频宽高比参数。**文本生成视频请求的必填参数。当传递image_url时该参数无效,宽高比最终将由传递的图片决定。**

可选值:"16:9", "4:3", "1:1", "3:4", "9:16"

input.watermark
可选
string

视频水印文本内容。空字符串表示不添加水印,非空字符串将在视频右下角显示指定的水印文本。

请求示例
curl -X POST 'https://api.vezapi.com/api/v1/jobs/createTask' \
  -H 'Authorization: Bearer YOUR_VEZAPI_KEY' \
  -H 'Idempotency-Key: your-unique-request-id' \
  -H 'Content-Type: application/json' \
  -d '{
  "model": "runway",
  "input": {
    "prompt": "A fluffy orange cat dancing energetically in a colorful room with disco lights",
    "duration": "5",
    "quality": "720p",
    "aspect_ratio": "9:16"
  }
}'
返回值与错误

HTTP 200

请求成功

参数类型说明与限制
code
可选
integer

Status code of the request. The HTTP status is 200 even when the request fails, so always check this field: 200 means success; any other value means the request failed and msg describes the reason. Common values: 401 invalid or missing API key; 402 insufficient credits; 429 rate limit exceeded; 422 or 500 the request could not be processed (read msg and check your parameters before retrying).

可选值:200, 401, 404, 422, 451, 455, 500

msg
可选
string

Error message when code != 200

data
可选
object
data.taskId
可选
string

Unique identifier for the generation task, can be used with `Get AI Video Details` to query task status

HTTP 500

服务器错误

任务状态与回调

异步任务请保存返回的 taskId。调用 GET /api/v1/jobs/recordInfo?taskId=... 查询,或在创建时设置 callBackUrl。只有任务所属账号可以查询任务或基于任务创建派生资源。

超时可能表示请求已经受理。请在控制台查看原请求,不要自动新建任务。回调可能重试并重复到达,请使用 X-VezAPI-Event-Id 去重。

文件、日志与计费

生成媒体通常随上游保留 14 天,上传文件在 24 小时后失效。请在过期前保存所需文件。VezAPI 仅流式转发已登记资源,不提供永久作品库。请求日志保留两个自然月。

调用前预留积分,最终按实际优惠扣分 1:1 结算。用量不明时暂停新付费请求。若保护其他任务预留后余额不足以结算,会保留待结算记录,补足余额后再扣费;模型用量不会将钱包扣成负数。按时长计价的输入文件由服务端读取时长,读取失败时不提交模型任务。