Doubao SeeDance Video Generation
Generate videos using ByteDance Doubao SeeDance model
Note for users in mainland China: Please use https://toapis.cn as the API endpoint (Base URL). Replace https://toapis.com with https://toapis.cn in the examples in this document.
- ByteDance Doubao video generation model
- Use model parameter to select
doubao-seedance-1-0-pro-fastordoubao-seedance-1-0-pro-qualitymodel - Supports text-to-video generation
- Supports first frame / last frame / reference image control
- Async task management, query results by task ID
Important Change: For better performance and cost control, we no longer support passing base64 image data directly in image_urls. Please use the Upload Image API first to upload images and get URLs, then call this endpoint.
Authorizations
AuthorizationstringheaderrequiredAll endpoints require Bearer Token authentication
Get your API Key from the API Key Management Page
Add to request header:
Authorization: Bearer YOUR_API_KEYBody
modelstringbodyrequireddefault: doubao-seedance-1-0-pro-fastVideo generation model name
Available models:
doubao-seedance-1-0-pro-fast- Fast version (40-90 seconds generation)doubao-seedance-1-0-pro-quality- Quality version (90-300 seconds generation)
promptstringbodyrequiredVideo content description
Describe scenes, actions, styles in detail for better generation results
Example: "Sunset at the beach, golden sunlight on the sea, waves gently hitting the sand"
durationintegerbodydefault: 5Video duration (seconds)
Supported range: 2 ~ 12 seconds
Default: 5
aspect_ratiostringbodydefault: 16:9Video aspect ratio
Options:
16:9- Landscape9:16- Portrait1:1- Square4:3- Traditional ratio3:4- Vertical traditional ratio21:9- Ultra-wide
Default: 16:9
resolutionstringbodydefault: 720pVideo resolution
Options:
480p- Standard definition720p- High definition1080p- Full HD
Default: 720p
1080p Limitation: When using reference images (role: reference in image_with_roles), 1080p resolution is not supported
Resolution and Aspect Ratio Combinations
| Resolution | Supported Aspect Ratios | Notes |
|---|---|---|
| 480p | 16:9, 4:3, 1:1, 3:4, 9:16, 21:9 | All supported |
| 720p | 16:9, 4:3, 1:1, 3:4, 9:16, 21:9 | All supported |
| 1080p | 16:9, 4:3, 1:1, 3:4, 9:16, 21:9 | Reference image not supported |
image_urlsstring[]bodyFirst frame image URL array for image-to-video generation
⚠️ URL format only (base64 no longer supported)
- Publicly accessible image URL (http:// or https://)
- You can use the Upload Image API to upload local images and get URLs
Example: ["https://example.com/cat.png"]
image_urls and image_with_roles cannot be used together
image_with_rolesarraybodyImage array with roles for more precise control
Field Description
urlstringbodyrequiredImage URL address
rolestringbodyrequiredImage role
Options:
first_frame- First frame image, as video starting frame (only one supported)last_frame- Last frame image, as video ending frame (quality version only, only one supported)reference- Reference image, for guiding video style (only one supported)
Example:
[
{"url": "https://example.com/start.png", "role": "first_frame"},
{"url": "https://example.com/end.png", "role": "last_frame"}
]image_urlsandimage_with_rolescannot be used together- Only one image per role is supported
last_frameis only supported bydoubao-seedance-1-0-pro-qualityversion, fast version does not support first and last frame together
metadataobjectbodyExtended parameters (optional)
Field Description
seedintegerbodySeed integer for controlling generation randomness
Range: -1 ~ 2^32-1
Same seed value produces similar results, but not guaranteed to be identical
Asset review
When a request includes images, some channels review them automatically before submitting generation. No extra parameter is needed; pass image URLs in the existing image fields.
- An accepted request returns a video task immediately. When review is required, the task stays
queuedand generation is submitted only after all media in the request pass. First-time review can take several minutes; reusing the same URL for the same user and channel reuses the review result. - Each media preparation round lasts up to 20 minutes by default. Rejection or preparation timeout ends the task as
failed; seeerror.messagefor the reason. Failed review incurs no video generation fee. - Images must be public HTTP(S) URLs; Base64 and local paths are not accepted. Keep images within 30 MB. The model's existing format limits still apply.
- Channels that review media validate image URLs at submission: a URL with embedded credentials or longer than 2048 bytes returns HTTP 400 with
error.codeinvalid_private_assets. - Media is identified by URL. Use a new URL after the file content changes.
- Legacy
asset://references are retired and return HTTP 400.
Response
idstringUnique task identifier for status queries
objectstringObject type, always generation.task
modelstringModel name used
statusstringTask status
queued- Queued for processingin_progress- Processingcompleted- Successfully completedfailed- Failed
progressintegerTask progress percentage (0-100)
created_atintegerTask creation timestamp (Unix timestamp)
metadataobjectTask metadata
requestExample
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-1-0-pro-fast",
"prompt": "Sunset at the beach, golden sunlight on the sea, waves gently hitting the sand",
"duration": 5,
"aspect_ratio": "16:9",
"resolution": "720p"
}'curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-1-0-pro-quality",
"prompt": "A girl spinning under cherry blossom trees, petals falling with the wind",
"duration": 5,
"aspect_ratio": "9:16",
"resolution": "1080p"
}'curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "doubao-seedance-1-0-pro-quality",
"prompt": "Scene transitions from day to night, city lights gradually turning on",
"duration": 5,
"image_with_roles": [
{"url": "https://example.com/day.png", "role": "first_frame"},
{"url": "https://example.com/night.png", "role": "last_frame"}
]
}'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-0-pro-fast",
"prompt": "Sunset at the beach, golden sunlight on the sea, waves gently hitting the sand",
"duration": 5,
"aspect_ratio": "16:9",
"resolution": "720p"
}
)
task = response.json()
print(f"Task ID: {task['id']}")
print(f"Status: {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-0-pro-fast',
prompt: 'Sunset at the beach, golden sunlight on the sea, waves gently hitting the sand',
duration: 5,
aspect_ratio: '16:9',
resolution: '720p'
})
});
const task = await response.json();
console.log(`Task ID: ${task.id}`);
console.log(`Status: ${task.status}`);responseExample
{
"id": "task_vid_xyz789ghi012",
"object": "generation.task",
"model": "doubao-seedance-1-0-pro-fast",
"status": "queued",
"progress": 0,
"created_at": 1703884800,
"metadata": {}
}