volcengine-image-studio
Use this skill to actually generate images through a Volcengine/ARK-compatible image endpoint.
中文说明
这是一个面向 火山引擎 / ARK 兼容图片生成接口 的实战型 skill,不只是帮你写提示词,而是直接把图片生成跑起来。
适用场景包括:
- - 生成海报、宣传图、配图
- 文生图
- 单张或多张参考图生图
- 直接使用本地图片作为输入
- 一次生成多张结果图
- 自动下载生成结果到本地
Default path
Run the bundled script:
CODEBLOCK0
By default, URL results are auto-downloaded to Desktop. For multi-image runs, the script creates a new folder per run automatically and opens that folder in Finder.
Required config
The script reads config from env vars:
- -
VOLCENGINE_API_KEY or INLINECODE1 - INLINECODE2 or INLINECODE3
- INLINECODE4 or INLINECODE5
Supported modes
1. Text to image
CODEBLOCK1
2. One local reference image → one new image
CODEBLOCK2
3. One reference image URL → one new image
CODEBLOCK3
4. One reference image → multiple new images
CODEBLOCK4
5. Multiple reference images → multiple new images
CODEBLOCK5
You can also pass a local text file of URLs/paths:
CODEBLOCK6
Local image path support
- -
--image ~/Desktop/ref.png → automatically converted to a data: URL with base64 - INLINECODE8 → sent as-is
- INLINECODE9 → sent as-is
This lets you use local files directly without manually converting them.
Auto-download behavior
When the API returns image URLs, the script downloads them to Desktop by default.
Example download behavior:
- - Single image: INLINECODE10
- Multi-image run: INLINECODE11
Disable auto-download if needed:
CODEBLOCK7
Custom download directory:
CODEBLOCK8
Force a new folder even for single-image runs:
CODEBLOCK9
Disable per-run folders:
CODEBLOCK10
Disable auto-opening Finder:
CODEBLOCK11
Optional env vars
- -
VOLCENGINE_IMAGE_SIZE (example: 2K) - INLINECODE14 (default
1) - INLINECODE16 (default
standard) - INLINECODE18 (default
url) - INLINECODE20 (
disabled / auto) - INLINECODE23 (example:
3) - INLINECODE25 (
true / false) - INLINECODE28 (
true / false) - INLINECODE31 (default
generated-images) - INLINECODE33 (default
true) - INLINECODE35 (default
~/Desktop) - INLINECODE37 (
auto / true / false, default auto) - INLINECODE42 (
auto / true / false, default auto) - INLINECODE47 (default
120)
Execution checklist
- 1. Confirm prompt, target style, and whether reference images are needed.
- Add
--image once for single-reference generation, or repeat it for multi-reference generation. - For local images, pass the local path directly; the script converts it to base64 data URL automatically.
- For single-image-to-multi-image and multi-reference sequences, set
--sequential-image-generation auto and --sequential-max-images <N>. - Use
--stream true when the API returns incremental image events. - By default, returned image URLs are downloaded to Desktop; multi-image runs go into a new folder automatically.
- Mention the downloaded paths or folder path in the result.
- For multi-image runs, let Finder open the created folder unless the user disabled it.
- If it fails, surface the exact HTTP error or missing field.
Release positioning
Compared with an earlier bare-bones generation flow, this version is packaged around the logic that proved usable in practice:
- - supports Volcengine / ARK-compatible endpoint patterns
- supports reference-image workflows, including local files
- supports sequential multi-image generation
- supports automatic result download and run-based folder grouping
- better fits poster and commercial visual production
Troubleshooting
- - Missing key → set INLINECODE53
- Missing model → set INLINECODE54
- Missing endpoint → set INLINECODE55
- Local file not found → check the
--image path - 401/403 → key invalid or lacks permission
- 404/405 → endpoint wrong
- 400 → model/size/request body incompatible with the target API
- No returned files/URLs → inspect
raw in the JSON output
References
found → check the
--image path
- - 401/403 → key invalid or lacks permission
- 404/405 → endpoint wrong
- 400 → model/size/request body incompatible with the target API
- No returned files/URLs → inspect
raw in the JSON output
References
inspect
raw in the JSON output
References
volcengine-image-studio
使用此技能通过火山引擎/ARK兼容的图片生成接口实际生成图片。
中文说明
这是一个面向火山引擎/ARK兼容图片生成接口的实战型技能,不仅帮你写提示词,而是直接运行图片生成。
适用场景包括:
- - 生成海报、宣传图、配图
- 文生图
- 单张或多张参考图生图
- 直接使用本地图片作为输入
- 一次生成多张结果图
- 自动下载生成结果到本地
默认路径
运行捆绑脚本:
bash
python3 scripts/generate_image.py <提示词>
默认情况下,URL结果会自动下载到桌面。对于多图生成,脚本会自动为每次运行创建新文件夹,并在访达中打开该文件夹。
必需配置
脚本从环境变量读取配置:
- - VOLCENGINEAPIKEY 或 ARKAPIKEY
- VOLCENGINEMODEL 或 ARKMODEL
- VOLCENGINEENDPOINT 或 ARKBASE_URL
支持的模式
1. 文生图
bash
python3 scripts/generate_image.py 极简科技海报,深色背景,蓝紫色霓虹光效,高级感
2. 一张本地参考图 → 一张新图
bash
python3 scripts/generate_image.py 生成狗狗趴在草地上的近景画面 \
--image ~/Desktop/dog-reference.png \
--sequential-image-generation disabled
3. 一张参考图URL → 一张新图
bash
python3 scripts/generate_image.py 生成狗狗趴在草地上的近景画面 \
--image https://ark-project.tos-cn-beijing.volces.com/docimage/seedream4imageToimage.png \
--sequential-image-generation disabled
4. 一张参考图 → 多张新图
bash
python3 scripts/generate_image.py 参考这个LOGO,做一套户外运动品牌视觉设计,品牌名称为GREEN,包括包装袋、帽子、纸盒、手环、挂绳等。绿色视觉主色调,趣味、简约现代风格 \
--image https://ark-project.tos-cn-beijing.volces.com/docimage/seedream4imageToimages.png \
--sequential-image-generation auto \
--sequential-max-images 5 \
--stream true
5. 多张参考图 → 多张新图
bash
python3 scripts/generate_image.py 生成3张女孩和奶牛玩偶在游乐园开心地坐过山车的图片,涵盖早晨、中午、晚上 \
--image https://ark-project.tos-cn-beijing.volces.com/docimage/seedream4imagesToimages_1.png \
--image https://ark-project.tos-cn-beijing.volces.com/docimage/seedream4imagesToimages_2.png \
--sequential-image-generation auto \
--sequential-max-images 3 \
--stream true
你也可以传入包含URL/路径的本地文本文件:
bash
python3 scripts/generate_image.py 根据参考图生成多张变体 --image-file ./refs.txt
本地图片路径支持
- - --image ~/Desktop/ref.png → 自动转换为包含base64的data: URL
- --image https://... → 原样发送
- --image data:image/png;base64,... → 原样发送
这让你可以直接使用本地文件,无需手动转换。
自动下载行为
当API返回图片URL时,脚本默认将其下载到桌面。
下载示例:
- - 单张图片:~/Desktop/1710000000-my-prompt-1.jpeg
- 多图运行:~/Desktop/1710000000-my-prompt/1710000000-my-prompt-1.jpeg
如需禁用自动下载:
bash
python3 scripts/generate_image.py 极简科技海报 --download-results false
自定义下载目录:
bash
python3 scripts/generate_image.py 极简科技海报 --download-dir ~/Downloads/volcengine
即使单张图片也强制创建新文件夹:
bash
python3 scripts/generate_image.py 极简科技海报 --download-folder-per-run true
禁用每次运行创建文件夹:
bash
python3 scripts/generate_image.py 极简科技海报 --download-folder-per-run false
禁用自动打开访达:
bash
python3 scripts/generate_image.py 极简科技海报 --open-download-folder false
可选环境变量
- - VOLCENGINEIMAGESIZE(示例:2K)
- VOLCENGINEIMAGECOUNT(默认1)
- VOLCENGINEIMAGEQUALITY(默认standard)
- VOLCENGINERESPONSEFORMAT(默认url)
- VOLCENGINESEQUENTIALIMAGEGENERATION(disabled/auto)
- VOLCENGINESEQUENTIALMAXIMAGES(示例:3)
- VOLCENGINESTREAM(true/false)
- VOLCENGINEWATERMARK(true/false)
- VOLCENGINEOUTPUTDIR(默认generated-images)
- VOLCENGINEDOWNLOADRESULTS(默认true)
- VOLCENGINEDOWNLOADDIR(默认~/Desktop)
- VOLCENGINEDOWNLOADFOLDERPERRUN(auto/true/false,默认auto)
- VOLCENGINEOPENDOWNLOADFOLDER(auto/true/false,默认auto)
- VOLCENGINETIMEOUT(默认120)
执行检查清单
- 1. 确认提示词、目标风格以及是否需要参考图。
- 单参考图生成添加一次--image,多参考图生成重复添加。
- 对于本地图片,直接传入本地路径;脚本会自动将其转换为base64数据URL。
- 对于单图生多图和多参考图序列,设置--sequential-image-generation auto和--sequential-max-images 。
- 当API返回增量图片事件时,使用--stream true。
- 默认情况下,返回的图片URL会下载到桌面;多图运行会自动放入新文件夹。
- 在结果中提及下载路径或文件夹路径。
- 对于多图运行,让访达打开创建的文件夹,除非用户禁用了此功能。
- 如果失败,显示确切的HTTP错误或缺失字段。
发布定位
与早期简陋的生成流程相比,此版本围绕实践中证明可用的逻辑进行打包:
- - 支持火山引擎/ARK兼容的端点模式
- 支持参考图工作流程,包括本地文件
- 支持顺序多图生成
- 支持自动结果下载和基于运行的分组文件夹
- 更适合海报和商业视觉制作
故障排除
- - 缺少密钥 → 设置VOLCENGINEAPIKEY
- 缺少模型 → 设置VOLCENGINEMODEL
- 缺少端点 → 设置VOLCENGINEENDPOINT
- 找不到本地文件 → 检查--image路径
- 401/403 → 密钥无效或缺少权限
- 404/405 → 端点错误
- 400 → 模型/大小/请求体与目标API不兼容
- 没有返回文件/URL → 检查JSON输出中的raw
参考资料