众扬汇 AI 开放平台 API 文档

generate(文生视频

OpenAPI Specification

文生视频:提交描述词与模型,按可选参数生成视频。

请求方式:POST

接口地址

text
https://api.allyang.cn/runway/v1/pro/generate

请求头

  • Authorization(可选):鉴权头,使用控制台创建的令牌,格式为 Bearer + 令牌。(示例:Bearer {{YOUR_API_KEY}})

请求参数(application/json)

  • ratio(string,必填):画面比例;gen-3 仅支持 16:9 与 9:16,图生视频同样需传比例,不传按 16:9 处理。可选值 16:9、9:16、1:1、4:3、3:4、21:9。
    • 可选值:16:9、9:16、1:1、4:3、3:4、21:9。
  • prompt(string,必填)
  • style(string,必填):取值见站内「style 列表」页。
  • model(string,必填)
    • 可选值:gen2、gen3、gen4。
  • options(object,必填)
    • seconds(integer,必填):当前仅支持 gen-3、gen-4;取值为 5 或 10。
      • 可选值:5、10。
    • motion_vector(object,必填):当前仅支持 gen-2 版本。
      • x(integer,必填):取值范围 -10.0 ~ 10.0。
      • y(number,必填):取值范围 -10.0 ~ 10.0。
      • z(integer,必填):取值范围 -10.0 ~ 10.0。
      • r(integer,必填):取值范围 -10.0 ~ 10.0。
      • bg_x_pan(integer,必填):取值范围 -10.0 ~ 10.0。
      • bg_y_pan(integer,必填):取值范围 -10.0 ~ 10.0。
  • image(string,可选):选填;不传则为文生视频。
  • callback_url(string,必填)

请求示例

json
{
  "options": {
    "seconds": null,
    "motion_vector": {
      "x": null,
      "y": null,
      "z": null,
      "r": null,
      "bg_x_pan": null,
      "bg_y_pan": null
    }
  },
  "callback_url": "https://example.com/…"
}

返回:HTTP 200 表示成功,响应体字段待补(以实测为准)。

使用提示:提交后请用查询接口轮询结果;耗时、限流与计费数值以本平台实测与计费页为准(待补)。