Loading...
Loading...
Generate videos using ByteDance's Seedance model. It supports text-to-video and image-to-video functions, and calls APIs through the volcengine-ark SDK. This skill is activated when users need to generate videos, create video content, or produce videos based on text or images.
npx skill4agent add freestylefly/canghe-skills seedance-videopip install 'volcengine-python-sdk[ark]'cd ~/.openclaw/workspace/skills/seedance-video
python3 scripts/generate_video.py "A cute cat playing on the grass" --wait -o cat.mp4python3 scripts/generate_video.py "Seaside at sunset" \
--duration 10 \
--ratio 16:9 \
--wait \
-o sunset.mp4python3 scripts/generate_video.py "Make the cat move" \
--image-url https://example.com/cat.jpg \
--duration 5 \
--waitpython3 scripts/generate_video.py "City under the starry sky" -o starry.mp4
# Return task IDpython3 scripts/generate_video.py --status <task_id> --wait -o starry.mp4| Parameter | Default Value | Description |
|---|---|---|
| Required | Video description prompt |
| output.mp4 | Output file path |
| doubao-seedance-1-5-pro-251215 | Model ID |
| 5 | Video duration (seconds) |
| 16:9 | Aspect ratio (16:9, 9:16, 1:1, 4:3, etc.) |
| false | Add watermark |
| false | Return the last frame image |
| None | First frame image URL (for image-to-video) |
| false | Wait for video generation to complete and download automatically |
| None | Query the status of the specified task ID |
ARK_API_KEYSEEDANCE_API_KEYcp .canghe-skills/.env.example .canghe-skills/.env.canghe-skills/.envARK_API_KEY=your-actual-api-key-hereexport ARK_API_KEY="your-api-key"
# Or
export SEEDANCE_API_KEY="your-api-key"process.env.canghe-skills/.env~/.canghe-skills/.envA golden retriever running in an autumn park, golden fallen leaves falling, afternoon sunlight passing through the leaves, cinematic lens, stabilizer shooting, 4K qualityA robot walking on a neon street in a future city, cyberpunk style, rainy night, reflections, wide-angle lens, cinematic color tonefrom volcenginesdkarkruntime import Ark
from scripts.generate_video import create_video_task, wait_for_video
# Initialize client
client = Ark(
base_url="https://ark.cn-beijing.volces.com/api/v3",
api_key="your-api-key"
)
# Create video task
result = create_video_task(
client=client,
model="doubao-seedance-1-5-pro-251215",
prompt="A bird flying in the sky",
duration=5
)
task_id = result["task_id"]
# Wait and get result
final_status = wait_for_video(client, task_id)
video_url = final_status["video_url"]queuedrunningsucceededfailed