视频接口(待开放)

创建文生视频、图生视频和视频转视频任务。

视频接口(待开放)

使用 POST /v1/videos/generations 创建视频任务。接口会返回任务 id,最终视频地址需要到 任务查询 里获取。

该接口文档仅供预览,暂未开放。

接口地址

POST /v1/videos/generations

请求参数

字段类型是否必填说明
providerstring必填视频服务,例如 kiefal
modelstring必填视频模型,例如 sora-2-pro-text-to-video
scenestring必填可选 text-to-videoimage-to-videovideo-to-video
promptstring文生视频必填视频内容描述。
image_inputstring 或 string[]图生视频必填一张或多张参考图片 URL。
video_inputstring 或 string[]视频转视频必填作为输入的源视频 URL。
optionsobject可选模型支持的额外参数,例如 durationaspect_ratio

场景和积分

场景必填输入积分
text-to-videoprompt6
image-to-videoimage_input8
video-to-videovideo_input10

示例:文生视频

curl https://sseedance.com/v1/videos/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "kie",
    "model": "sora-2-pro-text-to-video",
    "scene": "text-to-video",
    "prompt": "日出时玻璃城市的电影感镜头"
  }'

示例:图生视频

curl https://sseedance.com/v1/videos/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "kie",
    "model": "sora-2-pro-image-to-video",
    "scene": "image-to-video",
    "image_input": ["https://cdn.example.com/reference.png"],
    "options": {
      "duration": "10"
    }
  }'

示例:视频转视频

curl https://sseedance.com/v1/videos/generations \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "provider": "fal",
    "model": "fal-ai/kling-video/o1/video-to-video/edit",
    "scene": "video-to-video",
    "video_input": ["https://cdn.example.com/source.mp4"]
  }'

返回结果

{
  "id": "task_id",
  "object": "video.generation.task",
  "status": "pending",
  "data": {
    "id": "task_id",
    "mediaType": "video",
    "status": "pending",
    "videoUrls": []
  }
}

GET /v1/tasks/{id} 查询最终的 videoUrls

视频接口(待开放)