获取 API Key 获取 API
文档

Omni-Flash-Ext 视频生成

- Omni-Flash-Ext 统一视频生成模型

  • 支持文生视频、单图生视频、参考视频和 3 张参考图融合
  • 支持 720p/1080p/4k 分辨率,4/6/8/10 秒时长
  • 异步任务接口,提交后通过任务 ID 查询生成结果

请求示例

curl --request POST \
  --url https://api.openveer.com/v1/videos/generations \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "Omni-Flash-Ext",
    "prompt": "a girl is dancing happily in a sunny garden",
    "duration": 10,
    "resolution": "1080p",
    "aspect_ratio": "9:16"
  }'

响应示例

{
  "code": 200,
  "data": [
    {
      "status": "submitted",
      "task_id": "task_01KS1H7ZYSJWH1N779S2FSHTKA"
    }
  ]
}

认证

Authorization string

所有接口均需要使用 Bearer Token 进行认证。

获取 API Key:

访问 API Key 管理页面 获取您的 API Key。

使用时在请求头中添加:

Authorization: Bearer YOUR_API_KEY

请求参数

model string

视频生成模型名称,固定为 Omni-Flash-Ext。

prompt string

视频内容描述。建议详细描述场景、人物、动作、环境、镜头运动、画面风格和音频提示。

示例:"a girl is dancing happily in a sunny garden"

duration integer

视频时长,单位为秒。

仅支持:4、6、8、10。

警告



传入 5、7 等其他时长会返回 invalid_duration 错误。

警告



上传参考视频时不需要传入 duration。duration 与 video_urls 不可以同时传入。

resolution string

视频分辨率,不区分大小写。

可选值:

  • 720p
  • 1080p
  • 4k

警告



传入其他分辨率会返回 invalid_resolution 错误。

aspect_ratio string

视频宽高比,用于控制横屏或竖屏。

常用值:

  • 16:9 - 横屏
  • 9:16 - 竖屏

默认值:16:9

size string

兼容字段,含义与 aspect_ratio 相同。若同时传入,建议保持与 aspect_ratio 一致。

generation_type string

生成类型,用于指定图片的使用方式。

可选值:

  • frame - 首帧模式。image_urls 只可以上传 1 张图片,作为视频首帧。
  • reference - 参考模式。image_urls 可以上传 1 张或 3 张图片,作为参考图。

警告



当 generation_type 为 frame 时,image_urls 仅支持 1 张图片;传入其他数量会返回 unsupported_image_count 错误。

image_urls string

">
参考图片 URL 数组。可不传、传 1 张或传 3 张,具体数量取决于 generation_type:

  • 不传或空数组:文生视频
  • 1 张图片:单图生视频
  • 3 张图片:参考图融合(仅在 generation_type 为 reference 时支持)

与 generation_type 的关系:

  • generation_type 为 frame:只可以上传 1 张图片。
  • generation_type 为 reference:可以上传 1 张或 3 张图片。

只支持公网可访问的图片 URL。

警告



不支持 2 张图的首尾帧模式。传入 2 张图片会返回 unsupported_image_count 错误。4 张及以上未实测验证,不建议使用。

video_urls string

">
参考视频 URL 数组。可不传或传 1 个参考视频。

只支持公网可访问的 HTTP/HTTPS 视频 URL。可与 image_urls 同时传入,图片作为身份或构图参考,视频作为动态参考。

警告



Omni-Flash-Ext 仅支持 0 或 1 个参考视频。传入 2 个及以上视频会返回 unsupported_video_count 错误。

警告



传入 video_urls 时不需要传入 duration。video_urls 与 duration 不可以同时传入。

响应

code integer

响应状态码,成功时为 200。

data array
返回任务数组。
status string

任务初始状态,提交成功时为 submitted。

task_id string

任务唯一标识符,用于查询任务状态和结果。

查询任务结果

视频生成为异步任务。提交后会返回 task_id,使用 获取任务状态 接口查询生成进度和结果。

curl --request GET \
  --url https://api.openveer.com/v1/tasks/task_01KS1H7ZYSJWH1N779S2FSHTKA \
  --header 'Authorization: Bearer <token>'

建议提交后等待 5-10 秒再开始查询,后续每 5-10 秒轮询一次。单个任务通常约 3-5 分钟完成。

成功结果示例

{
  "code": 200,
  "data": {
    "id": "task_01KS1H7ZYSJWH1N779S2FSHTKA",
    "status": "completed",
    "progress": 100,
    "created": 1779246294,
    "completed": 1779246534,
    "actual_time": 240,
    "estimated_time": 600,
    "cost": 0.4,
    "credits_cost": 4,
    "result": {
      "videos": [
        {
          "url": ["https://cdn.example.com/videos/abc.mp4"],
          "expires_at": 1779332760
        }
      ]
    }
  }
}

失败结果示例

{
  "code": 200,
  "data": {
    "id": "task_01KS1H7ZYSJWH1N779S2FSHTKA",
    "status": "failed",
    "progress": 100,
    "created": 1779246294,
    "completed": 1779246534,
    "actual_time": 240,
    "estimated_time": 600,
    "cost": 0,
    "credits_cost": 0,
    "error": {
      "message": "invalid duration 7, must be one of 4/6/8/10",
      "code": "task_failed"
    }
  }
}

使用场景

场景 1:文生视频

{
  "model": "Omni-Flash-Ext",
  "prompt": "a beautiful sunset over the ocean with seagulls flying",
  "duration": 6,
  "resolution": "720p",
  "aspect_ratio": "16:9"
}

场景 2:单图生视频

{
  "model": "Omni-Flash-Ext",
  "prompt": "make the character smile and slowly turn around, cinematic camera motion",
  "duration": 6,
  "resolution": "1080p",
  "aspect_ratio": "9:16",
  "image_urls": ["https://example.com/character.jpg"]
}

场景 3:3 张参考图融合

{
  "model": "Omni-Flash-Ext",
  "prompt": "a creative scene combining these elements with smooth camera motion",
  "duration": 10,
  "resolution": "1080p",
  "aspect_ratio": "9:16",
  "image_urls": [
    "https://example.com/scene.jpg",
    "https://example.com/character.jpg",
    "https://example.com/product.jpg"
  ]
}

场景 4:4K 短视频

{
  "model": "Omni-Flash-Ext",
  "prompt": "close-up of a hummingbird hovering in front of a red flower",
  "duration": 4,
  "resolution": "4k",
  "aspect_ratio": "16:9"
}

场景 5:参考视频生成

{
  "model": "Omni-Flash-Ext",
  "prompt": "the same scene but at night with neon lights",
  "resolution": "720p",
  "aspect_ratio": "16:9",
  "video_urls": ["https://example.com/reference.mp4"]
}

错误码

HTTP 错误类型 含义 处理建议
400 invalid_request_error model 不是 Omni-Flash-Ext、prompt 为空或 JSON 格式错误 检查请求体
400 invalid_duration duration 不是 4、6、8 或 10 改成支持的时长
400 invalid_resolution resolution 不是 720p、1080p 或 4k 改成支持的分辨率
400 unsupported_image_count image_urls 数量不受支持,常见于传入 2 张图 改成 0、1 或 3 张图片
400 unsupported_video_count video_urls 数量不受支持,常见于传入 2 个及以上视频 改成 0 或 1 个参考视频
401 authentication_error Token 无效 检查 Bearer Token
402 payment_required 账户余额不足 充值后重试
429 rate_limit_error 触发限流 降低并发或稍后重试

任务失败时,任务查询接口会在 data.error 中返回失败原因。常见原因包括上游配额暂时耗尽、内容审核未通过或上游超时。