This skill is used to call the Seedance 2.0 video generation capability on Volcano Ark, supporting:
- Text-to-video (prompt only)
- Image-to-video (first frame/first and last frames)
- Multi-reference generation (up to 9 reference images, up to 3 reference videos)
Usage
Run in the skill directory scripts/generate.py。
Parameters
--prompt: video text prompt--first_frame: first frame image (URL or local path)--last_frame: last frame image (URL or local path)--reference_images: reference images (URL or local path, up to 9 images)--reference_videos: reference videos (URL or local path, up to 3 videos)--resolution: resolution (e.g.720p、1080p)--ratio: aspect ratio (e.g.16:9、9:16、1:1、adaptive)--duration: duration (seconds)
Examples
Text-to-video:
python3 scripts/generate.py --prompt "A cute cat playing with a ball of yarn in a sunny room" --ratio 16:9 --duration 5
Image-to-video (first frame):
python3 scripts/generate.py --prompt "The cat jumps" --first_frame "/path/to/cat.jpg" --ratio 16:9 --duration 5
Multiple reference images:
python3 scripts/generate.py --prompt "A scenic landscape" --reference_images "/path/to/img1.jpg" "/path/to/img2.jpg" --ratio 16:9
Local material processing logic (important)
- Local images:
- When "TOS is available", they will first be uploaded to TOS, then a public URL will be used for generation.
- If no TOS is available, it will automatically be converted to
data:<mime>;base64,...format for submission.
- Local reference videos: It is recommended to provide a public URL directly; if a local video is provided, available TOS is required to upload it first and convert it to a public URL.
- Video output:
- If TOS is available, it will attempt to transfer the generated video to TOS and output the TOS URL.
- Otherwise, it will directly return the model's original video URL (usually time-limited; it is recommended to download or transfer it as soon as possible).
Environment variables
Minimum required:
ARK_API_KEYSEEDANCE_EP_IDARK_BASE_URL(optional, defaulthttps://ark.cn-beijing.volces.com/api/v3)
To enable TOS upload/transfer:
VOLC_ACCESS_KEYVOLC_SECRET_KEYTOS_ENDPOINTTOS_REGIONTOS_BUCKETTOS_UPLOAD_ENABLED(optional, defaulttrue)
Output
The script will poll the task until it ends, and output in the terminal:
Final Video URL: <url>