Install
openclaw skills install doubao-mediaDoubao (Volcengine ARK) 文生图、文生视频工具 - 生成后自动发送到对话,无需手动查找文件。Text-to-image and text-to-video with auto-send to chat.
openclaw skills install doubao-media中文: 豆包(字节跳动火山引擎ARK)文生图、文生视频工具。生成后自动发送到对话,无需手动查找文件。
English: Doubao (ByteDance Volcengine ARK) text-to-image and text-to-video tool. Auto-sends generated content to chat, no manual file search needed.
| Feature | 中文 | English |
|---|---|---|
| Text-to-Image | ✅ 文生图 | ✅ Generate images from text |
| Text-to-Video | ✅ 文生视频 | ✅ Generate videos from text |
| Image-to-Video | ✅ 图生视频 | ✅ Generate videos from images |
| Auto-Send to Chat | ✅ 自动发送到对话 | ✅ Auto-send to conversation |
| Windows Compatible | ✅ Windows 兼容 | ✅ Windows compatible |
requests librarypip install requests
# Windows PowerShell
$env:ARK_API_KEY="your_api_key_here"
# Linux/Mac
export ARK_API_KEY="your_api_key_here"
python scripts/doubao_media.py img "一只可爱的橘猫在阳光下睡觉"
Result / 结果:
output/ directory / 图片保存到 output/ 目录# Sync mode (wait for completion) / 同步模式(等待完成)
python scripts/doubao_media.py vid "一只猫在草地上奔跑" --duration 5
# Async mode (return task ID) / 异步模式(返回任务ID)
python scripts/doubao_media.py vid "一只猫在草地上奔跑" --async
python scripts/doubao_media.py vid "让这只猫动起来" --image "https://example.com/cat.jpg"
python scripts/doubao_media.py status "task_xxxxx"
| Parameter | Default | Description |
|---|---|---|
prompt | Required | Text description / 文本描述 |
--size | 1024x1024 | Image size: 1024x1024, 1024x1536, 1536x1024 |
| Parameter | Default | Description |
|---|---|---|
prompt | Required | Text description / 文本描述 |
--duration | 5 | Duration in seconds (2-12) / 时长(秒) |
--ratio | 16:9 | Aspect ratio: 16:9, 4:3, 1:1, 9:16 |
--image | None | Image URL for image-to-video / 图生视频的图片URL |
--async | False | Async mode / 异步模式 |
| Model ID | Function | Description |
|---|---|---|
doubao-seedream-3-0-t2i-250415 | Text-to-Image / 文生图 | Generate images from text |
doubao-seedance-1-0-pro-250528 | Text-to-Video / 文生视频 | Generate videos from text or images |
Generated files are saved to / 生成的文件保存到:
~/.openclaw/workspace/output/
├── img_YYYYMMDD_HHMMSS.jpeg # Images / 图片
└── vid_YYYYMMDD_HHMMSS.mp4 # Videos / 视频
| Operation | Time | Description |
|---|---|---|
| Text-to-Image / 文生图 | 10-30s | Depends on complexity |
| Text-to-Video / 文生视频 | 1-3min | 5-second video |
Solution / 解决方案:
$env:ARK_API_KEY="your_api_key" # Windows
export ARK_API_KEY="your_api_key" # Linux/Mac
Solution / 解决方案: Go to Volcengine Console → Model Management and activate the required models. 前往火山引擎控制台 → 模型管理,开通所需模型。
Required models / 需要开通的模型:
Solution / 解决方案:
The script handles this automatically with PYTHONIOENCODING=utf-8.
Version / 版本: 1.0.0 Last Updated / 最后更新: 2026-03-29