Seedance Video Generation
Generate high-quality AI videos using the Volcengine Seedance model, supporting multiple creation modes such as text-to-video (T2V), image-to-video (I2V), and audio-synced video generation.
✨ Node.js Version: This script is implemented using Node.js, no Python environment required. The entry script automatically detects the Node.js runtime (prioritizes system node, falls back to LobsterAI's built-in runtime), making it out-of-the-box for both Windows and Mac users.
Configuration
- Base URL:
https://ark.cn-beijing.volces.com/api/v3
- API Key: Read from the environment variable
- Authentication:
Authorization: Bearer {API_KEY}
- SDK: Compatible with Volcano Ark Python SDK
How to Configure API Key
Method 1: Configure via Environment Variables (Recommended)
Set the environment variable in the terminal:
bash
# macOS/Linux
export ARK_API_KEY="Your API Key"
# Or add to ~/.zshrc or ~/.bashrc for permanent effect
echo 'export ARK_API_KEY="Your API Key"' >> ~/.zshrc
source ~/.zshrc
powershell
# Windows PowerShell
$env:ARK_API_KEY="Your API Key"
# Or set as a system environment variable for permanent effect
[System.Environment]::SetEnvironmentVariable('ARK_API_KEY', 'Your API Key', 'User')
Method 2: Inject via LobsterAI Startup
LobsterAI automatically reads system environment variables. Ensure
is set before launching LobsterAI.
How to Obtain API Key:
- Visit the Volcano Ark Console: https://console.volcengine.com/ark/region:ark+cn-beijing/apikey
- Create a new API Key
- Copy the key and set it as an environment variable
Pre-checks
No dependencies required! This script is compatible with Node.js built-in modules.
LobsterAI includes the Node.js runtime, and all necessary dependencies are automatically packaged. No additional configuration is needed for Windows and Mac users.
Workflow
Seedance video generation is an asynchronous process:
- Submit Task - Call the API to create a video generation task and obtain the
- Poll Status - Query the task status every few seconds until it changes to
- Download Video - Download the generated MP4 file from the field
Quotas and Limits
Free Tier
All Seedance models offer the following in default mode (online inference):
- 2 million tokens free quota
- No free quota for flex mode (offline inference)
Note: The documentation does not specify how many videos can be generated with 2 million tokens. Consumption depends on video duration, resolution, and whether images/audio are used. It is recommended to test in small batches first.
Rate Limits
| Model Series | RPM (Requests Per Minute) | Concurrency | TPD (Daily Token Limit for Offline Mode) |
|---|
| Pro Series | 600 | 10 | 500 billion |
| Lite Series | 300 | 5 | 250 billion |
- RPM Limit: Maximum number of tasks allowed to be created per minute for the same model under the account
- Concurrency Limit: Maximum number of tasks being processed at the same time
- TPD Limit: Total token call limit for the same model in flex mode within a day
Video Retention Time
⚠️ Important Reminder:
- Task data (including video URLs) is only retained for 24 hours
- It will be automatically cleared after the timeout
- Be sure to download and save the generated video in a timely manner
Usage Examples
Path Explanation: The examples below use the
environment variable to reference the script path. LobsterAI automatically sets this variable to point to the actual SKILLs directory location, so there is no need to modify the path manually.
1. Text-to-Video (T2V)
Generate videos based on text descriptions, suitable for creative inspiration and concept validation.
bash
bash "$SKILLS_ROOT/seedance/scripts/generate-video.sh" \
--prompt "A kitten playing on the grass, sunny day, camera slowly zooms in" \
--duration 5 \
--output generated_video.mp4
Example Prompts:
- "Realistic style, under a clear blue sky, a large field of white daisies, the camera gradually zooms in, finally focusing on a close-up of a daisy with a few glistening dewdrops on its petals"
- "A subway rumbles past, pages flutter, the camera starts to rotate 360 degrees around the girl"
- "Sunset by the sea, waves gently lap the beach, peaceful and serene atmosphere"
2. Image-to-Video (I2V) - First Frame Guidance
Generate dynamic videos based on the first frame image, supports local images and web URLs.
bash
# Use local image
bash "$SKILLS_ROOT/seedance/scripts/generate-video.sh" \
--prompt "The girl opens her eyes, looks gently at the camera, her hair blown by the wind" \
--image "/Users/yourname/Pictures/girl.jpg" \
--duration 5 \
--output i2v_video.mp4
# Use web image
bash "$SKILLS_ROOT/seedance/scripts/generate-video.sh" \
--prompt "The girl opens her eyes, looks gently at the camera, her hair blown by the wind" \
--image "https://example.com/first_frame.jpg" \
--duration 5 \
--output i2v_video.mp4
Supported Image Sources:
- ✅ Local files:
- ✅ Web URLs:
https://example.com/image.jpg
- ✅ file:// protocol:
file:///path/to/image.jpg
Supported Image Formats:
- jpg, jpeg, png, gif, webp, bmp, tiff, heic
3. Image-to-Video (I2V) - First and Last Frame Guidance
Provide first and last frames to generate transition animations. Supports local images.
bash
bash "$SKILLS_ROOT/seedance/scripts/generate-video.sh" \
--prompt "360-degree orbiting camera movement, smooth transition" \
--image "/Users/yourname/Pictures/first_frame.jpg" \
--image "/Users/yourname/Pictures/last_frame.jpg" \
--duration 5 \
--output transition_video.mp4
4. Multi-Reference Image Video Generation
Generate videos by merging features from multiple reference images. Supports mixing local and web images.
bash
bash "$SKILLS_ROOT/seedance/scripts/generate-video.sh" \
--prompt "[Image 1] A boy wearing glasses and a blue T-shirt with [Image 2] a Corgi puppy, sitting on [Image 3] the lawn, cartoon style video" \
--image "/Users/yourname/Pictures/person.jpg" \
--image "https://example.com/dog.jpg" \
--image "/Users/yourname/Pictures/grass.jpg" \
--model "doubao-seedance-1-0-lite-i2v-250428" \
--duration 5 \
--output multi_ref_video.mp4
5. Audio-Synced Video Generation (1.5 pro only)
Generate videos with audio (environmental sounds, action sounds, background music, etc.). Supports local images.
bash
bash "$SKILLS_ROOT/seedance/scripts/generate-video.sh" \
--prompt "Camera pushes in around the character, close-up on the face, she is singing 'Moon shifts shadow of flowers, I suspect a jade person comes' in Peking Opera style, full of emotion" \
--image "/Users/yourname/Pictures/actress.jpg" \
--audio \
--duration 5 \
--model "doubao-seedance-1-5-pro-251215" \
--output audio_video.mp4
Parameter Description
Required Parameters
| Parameter | Description | Example |
|---|
| Video description prompt (required) | "Kitten playing" |
Optional Parameters
| Parameter | Description | Default Value | Optional Values |
|---|
| Reference image path or URL (can be used multiple times) | None | Local file path or URL |
| Model ID | doubao-seedance-1-5-pro-251215
| See Model List |
| Video duration (seconds) | 5 | 2-12 (varies by model) |
| Aspect ratio | | , , , |
| Generate audio (only supported by 1.5 pro) | No | Flag parameter |
| Do not add watermark | No | Flag parameter |
| Output file path | | File path |
| Status query interval (seconds) | 5 | 1-10 |
| Maximum waiting time (seconds) | 300 | 60-600 |
Model Selection
Choose the appropriate model to balance quality, speed, and cost:
Seedance 1.5 pro (Recommended)
- Model ID:
doubao-seedance-1-5-pro-251215
- Features: Audio-video co-generation, highest quality
- Supported Modes: Text-to-video, image-to-video, first/last frame guidance, audio-enabled video
- Output: 480p-1080p, 24fps, 4-12 seconds
- Rate Limits: RPM 600, concurrency 10
Seedance 1.0 pro
- Model ID:
doubao-seedance-1-0-pro-250528
- Features: High-quality standard version
- Supported Modes: Text-to-video, image-to-video, first/last frame guidance
- Output: 480p-1080p, 24fps, 2-12 seconds
- Rate Limits: RPM 600, concurrency 10
Seedance 1.0 pro fast
- Model ID:
doubao-seedance-1-0-pro-fast-251015
- Features: Fast generation, lower cost
- Supported Modes: Text-to-video, image-to-video
- Output: 480p-1080p, 24fps, 2-12 seconds
- Rate Limits: RPM 600, concurrency 10
Seedance 1.0 lite (Lightweight Version)
- Text-to-Video:
doubao-seedance-1-0-lite-t2v-250428
- Image-to-Video:
doubao-seedance-1-0-lite-i2v-250428
- Features: Faster speed, supports multi-reference images
- Rate Limits: RPM 300, concurrency 5
Seedance 2.0 (Coming Soon)
- Model ID:
doubao-seedance-2-0-260128
- Features: Next-generation video generation model, comprehensive improvements in quality and performance
- Availability: ⏰ Expected to open API access at 18:00 on February 24, 2026
- Current Status: Only available in the Console Experience Center
Usage (after February 24):
bash
# Command line method
bash "$SKILLS_ROOT/seedance/scripts/generate-video.sh" \
--prompt "Your prompt" \
--model "doubao-seedance-2-0-260128" \
--duration 5
Or say in LobsterAI chat: "Generate video with Seedance 2.0..."
Recommended Usage Scenarios:
- Pursue highest quality + audio-video sync → 1.5 pro
- Standard high-quality video → 1.0 pro
- Fast generation for preview → 1.0 pro fast
- Multi-reference image fusion → 1.0 lite
- Next-generation latest model (after Feb 24) → 2.0
Advanced Options
Custom Aspect Ratio
Choose the appropriate aspect ratio based on usage scenarios:
bash
# Landscape video (suitable for YouTube, Bilibili)
--ratio "16:9"
# Portrait video (suitable for Douyin, Kuaishou)
--ratio "9:16"
# Square video (suitable for Instagram)
--ratio "1:1"
# Adaptive (automatically selected based on content)
--ratio "adaptive"
Custom Video Duration
Different models support different duration ranges:
bash
# Short video (fast generation)
--duration 2
# Standard duration
--duration 5
# Long video (richer content)
--duration 10
Note:
- Seedance 1.5 pro supports 4-12 seconds
- Seedance 1.0 series supports 2-12 seconds
- Longer duration means longer generation time
Remove Watermark
Generate watermark-free videos (for commercial use):
Polling and Timeout Control
Adjust polling strategy to suit different scenarios:
bash
# Fast query (suitable for short videos)
--poll-interval 3 --timeout 180
# Standard configuration
--poll-interval 5 --timeout 300
# Patient waiting (suitable for long videos or peak hours)
--poll-interval 10 --timeout 600
Status Description
Possible task statuses during generation:
| Status | Description | Action |
|---|
| Task is in queue | Continue waiting |
| Video is being generated | Continue waiting |
| Generation successful | Download video |
| Generation failed | Check error message |
Error Handling
Common Errors and Solutions
Error: ARK_API_KEY environment variable not set
- Cause: API Key not configured
- Solution: Follow the instructions in the "How to Configure API Key" section
Error: Task creation failed (HTTP 401)
- Cause: Invalid or expired API Key
- Solution: Check if the API Key is correct, or regenerate it in the console
Error: Task creation failed (HTTP 400)
- Cause: Parameter error (e.g., duration exceeds range)
- Solution: Check if parameters meet model requirements
Error: Task timeout
- Cause: Generation time is too long or API is busy
- Solution: Increase the value, or try again later
Error: Task failed
- Cause: Violent content, unclear prompts, incorrect image format, etc.
- Solution: Check prompt content, ensure image URLs are accessible
Error: Rate limited (HTTP 429)
- Cause: Exceeded RPM or concurrency limits
- Solution: Wait 1 minute and try again, or upgrade quota
Output Format
Generated videos have the following characteristics:
- Format: MP4
- Encoding: H.264
- Resolution: 480p / 720p / 1080p (automatically selected based on model)
- Frame Rate: 24 fps
- Audio: AAC (if is enabled)
- File Size: Approximately 2-5 MB/sec (1080p)
Prompt Best Practices
Characteristics of Excellent Prompts
- Clear scene description - Explain environment, time, atmosphere
- Specific action details - Describe specific actions of objects or characters
- Camera movement - Explain zoom, pan, tilt, close-up, etc.
- Style specification - Specify styles like realistic, cartoon, anime, etc.
Prompt Template
[Style], [Scene Description], [Subject Action], [Camera Movement], [Atmosphere/Mood]
Example:
Realistic style, sunset by the sea, a seagull circling in the air, camera slowly zooms in from a distance to a close-up of the seagull, peaceful and serene atmosphere
Prompt Notes
- ✅ Specific description: "Kitten chasing a butterfly" instead of "Kitten playing"
- ✅ Camera language: "Camera rotates 360 degrees" instead of "Rotate"
- ✅ Emotional atmosphere: "Warm bright sunlight" instead of "Good weather"
- ❌ Avoid vagueness: Too abstract descriptions increase randomness
- ❌ Avoid excessive length: Best to keep within 200 words
- ❌ Avoid violations: Do not include violent, pornographic, or other prohibited content
Common Usage Scenarios
Short Video Creation
bash
bash "$SKILLS_ROOT/seedance/scripts/generate-video.sh" \
--prompt "Product showcase: Smartwatch rotating to display from different angles" \
--ratio "9:16" \
--duration 5
Animated Short Film
bash
bash "$SKILLS_ROOT/seedance/scripts/generate-video.sh" \
--prompt "Cartoon style, little rabbit hopping in the forest" \
--ratio "16:9" \
--duration 8 \
--model "doubao-seedance-1-0-pro-250528"
Social Media Content
bash
bash "$SKILLS_ROOT/seedance/scripts/generate-video.sh" \
--prompt "Food close-up: Steaming ramen, chopsticks picking up noodles" \
--ratio "1:1" \
--duration 3
Educational Demonstration
bash
bash "$SKILLS_ROOT/seedance/scripts/generate-video.sh" \
--prompt "Science animation: Earth rotating, sunlight shining on the Earth's surface" \
--ratio "16:9" \
--duration 10
Reference Materials
Technical Support
If you encounter problems, you can:
- Check the error message output by the script
- Verify if the API Key configuration is correct
- Visit the Volcano Ark Console to view task details
- Refer to the official documentation for more details