视频/视频生成

所有视频生成 Provider:Seedance 和 Sora,含协议差异说明。

视频生成

UniGateway 按 Provider 和协议区分视频模型。每个视频家族使用各自的 Base URL 和请求格式。

提供的 Provider 和协议

Provider模型家族Base URL协议Content-Type鉴权
字节Seedancehttps://video.unigateway.ai/api/v3/contents/generations/tasksapplication/jsonAuthorization: Bearer $UNIGATEWAY_API_KEY
OpenAISorahttps://api.unigateway.ai/v1/v1/videosmultipart/form-dataAuthorization: Bearer $UNIGATEWAY_API_KEY

核心区别

方面SeedanceSora
Base URLhttps://video.unigateway.aihttps://api.unigateway.ai/v1
Content-Typeapplication/jsonmultipart/form-data
创建任务POST /api/v3/contents/generations/tasksPOST /v1/videos
查询状态GET /api/v3/contents/generations/tasks/{id}GET /v1/videos/{id}
任务列表GET /api/v3/contents/generations/tasks不可用
删除任务DELETE /api/v3/contents/generations/tasks/{id}不可用
素材库/api/v3/asset-groups/api/v3/assets不可用
模型发现不通过 GET /v1/modelsGET /v1/modelssupported_endpoint_types: ["openai-video"]
推荐模型doubao-seedance-2.0-fastsora-2

不要将 Sora 模型 ID 发送到 Seedance 接口,或将 Seedance 模型 ID 发送到 Sora 接口。两边的请求格式和 Content-Type 不兼容。

通用工作流

  1. 选择 Provider
  2. 提交视频生成请求
  3. 获取任务/作业 ID
  4. 轮询状态接口直至视频完成
  5. 保存视频链接