Video Gen API 开发者文档
使用指南火山兼容APIOpenAI 兼容API在线调试帮助支持

火山兼容 API 概览

使用 Seedance 参数体系生成视频、管理素材和完成真人认证

火山兼容 API 使用 https://jieyun.cc 作为服务地址,包含 Seedance 视频生成、Action 风格素材库和真人素材认证。视频生成适合文生视频、图片参考视频和多模态参考视频任务;素材库通过统一的 ActionVersion 入口管理素材组和素材。

接口

方法路径说明
POST/api/v3/contents/generations/tasks创建视频生成任务
GET/api/v3/contents/generations/tasks/{task_id}查询任务状态与结果
GET/api/v3/contents/generations/tasks查询视频生成任务列表
DELETE/api/v3/contents/generations/tasks/{task_id}取消或删除视频生成任务

最小请求

cURL

curl "https://jieyun.cc/api/v3/contents/generations/tasks" \
  -H "Authorization: Bearer $VIDEO_GEN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "doubao-seedance-2-0-260128",
    "content": [{ "type": "text", "text": "清晨的海边,一架纸飞机迎着风飞行" }],
    "duration": 5,
    "resolution": "720p",
    "ratio": "16:9"
  }'

JavaScript

const response = await fetch('https://jieyun.cc/api/v3/contents/generations/tasks', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.VIDEO_GEN_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    model: 'doubao-seedance-2-0-260128',
    content: [{ type: 'text', text: '清晨的海边,一架纸飞机迎着风飞行' }],
    duration: 5,
    resolution: '720p',
    ratio: '16:9',
  }),
});
const task = await response.json();

Python

import requests

response = requests.post(
    "https://jieyun.cc/api/v3/contents/generations/tasks",
    headers={"Authorization": f"Bearer {os.environ['VIDEO_GEN_API_KEY']}"},
    json={
        "model": "doubao-seedance-2-0-260128",
        "content": [{"type": "text", "text": "清晨的海边,一架纸飞机迎着风飞行"}],
        "duration": 5,
        "resolution": "720p",
        "ratio": "16:9",
    },
    timeout=30,
)
response.raise_for_status()
task = response.json()

媒体参考

火山兼容接口统一使用顶层 content 数组传入文本和参考素材。可组合文本、图片、视频、音频,并通过 role 声明首帧、尾帧或参考素材:

{
  "model": "doubao-seedance-2-0-260128",
  "content": [
    { "type": "text", "text": "保持主体一致,镜头缓慢向前推进" },
    { "type": "image_url", "image_url": { "url": "https://example.com/first.jpg" }, "role": "first_frame" },
    { "type": "video_url", "video_url": { "url": "https://example.com/reference.mp4" }, "role": "reference_video" }
  ],
  "duration": 5,
  "resolution": "720p",
  "ratio": "16:9"
}

content 支持 textimage_urlvideo_urlaudio_url 和样片 task_id。参考图片可设置 reference_imagefirst_framelast_frame 角色。

最后更新于