火山兼容 API 概览
使用 Seedance 参数体系生成视频、管理素材和完成真人认证
火山兼容 API 使用 https://jieyun.cc 作为服务地址,包含 Seedance 视频生成、Action 风格素材库和真人素材认证。视频生成适合文生视频、图片参考视频和多模态参考视频任务;素材库通过统一的 Action、Version 入口管理素材组和素材。
快速接入
使用 Bearer Token 创建并轮询第一个视频任务。
认证与签名
视频 Bearer Token、素材库 Bearer 与 AK/SK HMAC-SHA256。
SDK 与调试器
下载 Go SDK,或使用在线调试器生成 AK/SK 签名请求头。
素材库接口
通过 Action 管理素材组、素材和真人认证。
接口
| 方法 | 路径 | 说明 |
|---|---|---|
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 支持 text、image_url、video_url、audio_url 和样片 task_id。参考图片可设置 reference_image、first_frame、last_frame 角色。
最后更新于