Skip to main content
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-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"
  }'
{
  "id": "task_vid_xyz789ghi012",
  "object": "generation.task",
  "model": "doubao-seedance-1-0-pro-fast",
  "status": "queued",
  "progress": 0,
  "created_at": 1703884800,
  "metadata": {}
}
  • ByteDance Doubao video generation model
  • Use model parameter to select doubao-seedance-1-0-pro-fast or doubao-seedance-1-0-pro-quality model
  • 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

Authorization
string
required
All endpoints require Bearer Token authenticationGet your API Key from the API Key Management PageAdd to request header:
Authorization: Bearer YOUR_API_KEY

Body

model
string
default:"doubao-seedance-1-0-pro-fast"
required
Video generation model nameAvailable 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)
prompt
string
required
Video content descriptionDescribe scenes, actions, styles in detail for better generation resultsExample: "Sunset at the beach, golden sunlight on the sea, waves gently hitting the sand"
duration
integer
default:5
Video duration (seconds)Supported range: 2 ~ 12 secondsDefault: 5
aspect_ratio
string
default:"16:9"
Video aspect ratioOptions:
  • 16:9 - Landscape
  • 9:16 - Portrait
  • 1:1 - Square
  • 4:3 - Traditional ratio
  • 3:4 - Vertical traditional ratio
  • 21:9 - Ultra-wide
Default: 16:9
resolution
string
default:"720p"
Video resolutionOptions:
  • 480p - Standard definition
  • 720p - High definition
  • 1080p - Full HD
Default: 720p1080p Limitation: When using reference images (role: reference in image_with_roles), 1080p resolution is not supported

Resolution and Aspect Ratio Combinations

ResolutionSupported Aspect RatiosNotes
480p16:9, 4:3, 1:1, 3:4, 9:16, 21:9All supported
720p16:9, 4:3, 1:1, 3:4, 9:16, 21:9All supported
1080p16:9, 4:3, 1:1, 3:4, 9:16, 21:9Reference image not supported
image_urls
string[]
First 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_roles
array
Image array with roles for more precise controlExample:
[
  {"url": "https://example.com/start.png", "role": "first_frame"},
  {"url": "https://example.com/end.png", "role": "last_frame"}
]
  • image_urls and image_with_roles cannot be used together
  • Only one image per role is supported
  • last_frame is only supported by doubao-seedance-1-0-pro-quality version, fast version does not support first and last frame together
metadata
object
Extended parameters (optional)

Response

id
string
Unique task identifier for status queries
object
string
Object type, always generation.task
model
string
Model name used
status
string
Task status
  • queued - Queued for processing
  • in_progress - Processing
  • completed - Successfully completed
  • failed - Failed
progress
integer
Task progress percentage (0-100)
created_at
integer
Task creation timestamp (Unix timestamp)
metadata
object
Task metadata
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"
  }'
{
  "id": "task_vid_xyz789ghi012",
  "object": "generation.task",
  "model": "doubao-seedance-1-0-pro-fast",
  "status": "queued",
  "progress": 0,
  "created_at": 1703884800,
  "metadata": {}
}