curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-1-5-pro",
"prompt": "海灘日落,金色陽光照在海面上,海浪輕輕拍打沙灘",
"duration": 5,
"aspect_ratio": "16:9",
"metadata": {
"resolution": "720p",
"audio": true
}
}'
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-1-5-pro",
"prompt": "貓在草地上追逐一條蛇,鏡頭快速跟隨",
"image_with_roles": [
{"url": "https://example.com/first.png", "role": "first_frame"}
],
"metadata": {
"resolution": "720p",
"audio": true
}
}'
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-1-5-pro",
"prompt": "女孩在櫻花樹下旋轉,花瓣隨風飄落,最後慢慢停下",
"image_with_roles": [
{"url": "https://example.com/first.png", "role": "first_frame"},
{"url": "https://example.com/last.png", "role": "last_frame"}
],
"duration": 5,
"aspect_ratio": "9:16",
"metadata": {
"resolution": "720p",
"audio": true
}
}'
import requests
response = requests.post(
"https://toapis.com/v1/videos/generations",
headers={
"Authorization": "Bearer your-ToAPIs-key",
"Content-Type": "application/json"
},
json={
"model": "doubao-seedance-1-5-pro",
"prompt": "海灘日落,金色陽光照在海面上,海浪輕輕拍打沙灘",
"duration": 5,
"aspect_ratio": "16:9",
"metadata": {
"resolution": "720p",
"audio": True
}
}
)
task = response.json()
print(f"任務 ID: {task['id']}")
print(f"狀態: {task['status']}")
const response = await fetch('https://toapis.com/v1/videos/generations', {
method: 'POST',
headers: {
'Authorization': 'Bearer your-ToAPIs-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model: 'doubao-seedance-1-5-pro',
prompt: '海灘日落,金色陽光照在海面上,海浪輕輕拍打沙灘',
duration: 5,
aspect_ratio: '16:9',
metadata: {
resolution: '720p',
audio: true
}
})
});
const task = await response.json();
console.log(`任務 ID: ${task.id}`);
console.log(`狀態: ${task.status}`);
{
"id": "task_vid_xyz789ghi012",
"object": "generation.task",
"model": "doubao-seedance-1-5-pro",
"status": "queued",
"progress": 0,
"created_at": 1703884800,
"metadata": {}
}
doubao-seedance-1-5-pro
Doubao SeeDance 1.5 Pro 視頻生成
使用字節跳動豆包 Doubao SeeDance 1.5 Pro 模型生成視頻
POST
/
v1
/
videos
/
generations
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-1-5-pro",
"prompt": "海灘日落,金色陽光照在海面上,海浪輕輕拍打沙灘",
"duration": 5,
"aspect_ratio": "16:9",
"metadata": {
"resolution": "720p",
"audio": true
}
}'
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-1-5-pro",
"prompt": "貓在草地上追逐一條蛇,鏡頭快速跟隨",
"image_with_roles": [
{"url": "https://example.com/first.png", "role": "first_frame"}
],
"metadata": {
"resolution": "720p",
"audio": true
}
}'
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-1-5-pro",
"prompt": "女孩在櫻花樹下旋轉,花瓣隨風飄落,最後慢慢停下",
"image_with_roles": [
{"url": "https://example.com/first.png", "role": "first_frame"},
{"url": "https://example.com/last.png", "role": "last_frame"}
],
"duration": 5,
"aspect_ratio": "9:16",
"metadata": {
"resolution": "720p",
"audio": true
}
}'
import requests
response = requests.post(
"https://toapis.com/v1/videos/generations",
headers={
"Authorization": "Bearer your-ToAPIs-key",
"Content-Type": "application/json"
},
json={
"model": "doubao-seedance-1-5-pro",
"prompt": "海灘日落,金色陽光照在海面上,海浪輕輕拍打沙灘",
"duration": 5,
"aspect_ratio": "16:9",
"metadata": {
"resolution": "720p",
"audio": True
}
}
)
task = response.json()
print(f"任務 ID: {task['id']}")
print(f"狀態: {task['status']}")
const response = await fetch('https://toapis.com/v1/videos/generations', {
method: 'POST',
headers: {
'Authorization': 'Bearer your-ToAPIs-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model: 'doubao-seedance-1-5-pro',
prompt: '海灘日落,金色陽光照在海面上,海浪輕輕拍打沙灘',
duration: 5,
aspect_ratio: '16:9',
metadata: {
resolution: '720p',
audio: true
}
})
});
const task = await response.json();
console.log(`任務 ID: ${task.id}`);
console.log(`狀態: ${task.status}`);
{
"id": "task_vid_xyz789ghi012",
"object": "generation.task",
"model": "doubao-seedance-1-5-pro",
"status": "queued",
"progress": 0,
"created_at": 1703884800,
"metadata": {}
}
- 字節跳動豆包視頻生成模型 1.5 Pro 版本
- 支持文本到視頻生成
- 支持首幀/尾幀圖控制
- 不支持參考圖模式
- 支持音頻生成(1.5 Pro 獨有功能)
- 異步任務管理,通過任務 ID 查詢結果
Authorizations
string
必填
所有接口均需要使用 Bearer Token 進行認證獲取 API Key:訪問 API Key 管理頁面 獲取您的 API Key使用時在請求頭中添加:
Authorization: Bearer YOUR_API_KEY
Body
string
預設值:"doubao-seedance-1-5-pro"
必填
視頻生成模型名稱可用模型:
doubao-seedance-1-5-pro- 1.5 Pro 版,支持音頻生成和首幀/尾幀控制
string
必填
視頻內容描述詳細描述場景、動作、風格以獲得更好的生成效果示例:
"海灘日落,金色陽光照在海面上,海浪輕輕拍打沙灘"integer
預設值:5
視頻時長(秒)支持範圍:
4 ~ 12 秒默認:5string
預設值:"16:9"
視頻寬高比可選項:
16:9- 橫屏9:16- 豎屏1:1- 方形4:3- 傳統比例3:4- 豎向傳統比例21:9- 超寬屏
16:9分辨率與寬高比組合
| 分辨率 | 支持的寬高比 | 備註 |
|---|---|---|
| 480p | 16:9, 4:3, 1:1, 3:4, 9:16, 21:9 | 全部支持 |
| 720p | 16:9, 4:3, 1:1, 3:4, 9:16, 21:9 | 全部支持(默認) |
| 1080p | 16:9, 4:3, 1:1, 3:4, 9:16, 21:9 | 全部支持 |
string[]
兼容圖片 URL 數組,用於首尾幀圖生視頻兼容規則:
- 1 張圖片:作爲
first_frame - 2 張圖片:分別作爲
first_frame和last_frame - 超過 2 張:僅使用前兩張,其餘忽略
image_with_roles 顯式指定首幀和尾幀示例:["https://example.com/first.png", "https://example.com/last.png"]image_urls 和 image_with_roles 不能同時使用array
帶角色的圖像數組,用於顯式首尾幀控制
示例:
顯示 字段說明
顯示 字段說明
[
{"url": "https://example.com/first.png", "role": "first_frame"},
{"url": "https://example.com/last.png", "role": "last_frame"}
]
image_urls和image_with_roles不能同時使用- 首幀和尾幀僅支持各一張
- 1.5 Pro 不支持
reference_image(參考圖)角色,如需參考圖功能請使用 Seedance 2.0
object
與 1.0 版本的差異
| 特性 | 1.0 fast/quality | 1.5 Pro |
|---|---|---|
| 默認分辨率 | 1080p | 720p |
| 支持分辨率 | 480p/720p/1080p | 480p/720p/1080p |
| 時長範圍 | 2-12秒 | 4-12秒 |
| 音頻生成 | 不支持 | 支持 |
| 圖片控制模式 | reference 單參考圖 | first_frame / last_frame 首尾幀模式 |
Response
string
任務唯一標識符,用於查詢任務狀態
string
對象類型,固定爲
generation.taskstring
使用的模型名稱
string
任務狀態
queued- 排隊等待處理in_progress- 處理中completed- 成功完成failed- 失敗
integer
任務進度百分比(0-100)
integer
任務創建時間戳(Unix 時間戳)
object
任務元數據
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-1-5-pro",
"prompt": "海灘日落,金色陽光照在海面上,海浪輕輕拍打沙灘",
"duration": 5,
"aspect_ratio": "16:9",
"metadata": {
"resolution": "720p",
"audio": true
}
}'
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-1-5-pro",
"prompt": "貓在草地上追逐一條蛇,鏡頭快速跟隨",
"image_with_roles": [
{"url": "https://example.com/first.png", "role": "first_frame"}
],
"metadata": {
"resolution": "720p",
"audio": true
}
}'
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-1-5-pro",
"prompt": "女孩在櫻花樹下旋轉,花瓣隨風飄落,最後慢慢停下",
"image_with_roles": [
{"url": "https://example.com/first.png", "role": "first_frame"},
{"url": "https://example.com/last.png", "role": "last_frame"}
],
"duration": 5,
"aspect_ratio": "9:16",
"metadata": {
"resolution": "720p",
"audio": true
}
}'
import requests
response = requests.post(
"https://toapis.com/v1/videos/generations",
headers={
"Authorization": "Bearer your-ToAPIs-key",
"Content-Type": "application/json"
},
json={
"model": "doubao-seedance-1-5-pro",
"prompt": "海灘日落,金色陽光照在海面上,海浪輕輕拍打沙灘",
"duration": 5,
"aspect_ratio": "16:9",
"metadata": {
"resolution": "720p",
"audio": True
}
}
)
task = response.json()
print(f"任務 ID: {task['id']}")
print(f"狀態: {task['status']}")
const response = await fetch('https://toapis.com/v1/videos/generations', {
method: 'POST',
headers: {
'Authorization': 'Bearer your-ToAPIs-key',
'Content-Type': 'application/json'
},
body: JSON.stringify({
model: 'doubao-seedance-1-5-pro',
prompt: '海灘日落,金色陽光照在海面上,海浪輕輕拍打沙灘',
duration: 5,
aspect_ratio: '16:9',
metadata: {
resolution: '720p',
audio: true
}
})
});
const task = await response.json();
console.log(`任務 ID: ${task.id}`);
console.log(`狀態: ${task.status}`);
{
"id": "task_vid_xyz789ghi012",
"object": "generation.task",
"model": "doubao-seedance-1-5-pro",
"status": "queued",
"progress": 0,
"created_at": 1703884800,
"metadata": {}
}
⌘I