4Z API

Omni-Flash 视频生成

接口: POST https://4zapi.com/v1/video/create

Omni-Flash · 统一视频创建(POST /v1/video/create,VEO relay 物理路由,主文档见 relay/veo)。 按 model=omni-flash / omni-flash-edit 走 Omni-Flash 链路;type 决定具体能力:

  • 1=文生视频(仅需 prompt)
  • 2=首尾帧(images 需 1~2 张)
  • 3=垫图参考(images 需 1~3 张)
  • 4=Omni-Flash 视频编辑(需 input_reference)

返回 id(任务 ID),轮询 GET /v1/video/query?id= 获取结果。

参数

  • Content-Type (header, string): 请求体数据格式
  • Accept (header, string): 客户端期望接收的响应数据格式
  • Authorization (header, string): API 认证密钥,格式为 Bearer + 空格 + 你的 API Key

请求体 (application/json)

  • model (string, 必填): 模型名称(示例:omni-flash、omni-flash-edit)
  • prompt (string, 必填): 视频内容描述
  • aspect_ratio (string): 画幅比例 ["16:9", "9:16"]
  • enable_sample (boolean): Omni-Flash 系列切换 1080p(4K 模型忽略)
  • enable_upsample (boolean): 升级到 1080p(部分 4K 模型有效)
  • images (array<string>): 图片 URL 数组(type=2 需 1-2 张,type=3 需 1-3 张)
  • input_reference (string): Omni-Flash edit 参考视频(JSON 场景传 URL 或 dataURI)
  • seconds (string): 视频时长(秒),示例:"8"
  • size (string): 自定义尺寸,宽比高长为16:9,高比宽长为9:16,aspect_ratio生效时,该参数无效
  • type (integer): 生成类型:1=文生视频, 2=首尾帧, 3=垫图参考, 4=Omni-Flash 视频编辑 [1, 2, 3, 4]

请求示例

{
  "model": "omni-flash",
  "prompt": "hello world"
}