volcano-image-generator — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited volcano-image-generator (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
本 Skill 封装了火山方舟(Volcano Ark)图像生成 API,核心能力:
doubao-seedream-4.0 / doubao-seedream-3.0 系列模型volcano-image-generator/
├── SKILL.md # 本文件
├── config.example.json # 配置模板(复制为 config.json 并填入密钥)
└── scripts/
├── generate_image.py # 主生成脚本(CLI 入口)
├── volcano_signer.py # API 认证与签名封装
└── cost_manager.py # 成本管理模块当被触发时,按如下顺序工作:
config.json(从 config.example.json 复制并填写)cost_manager.py 评估预算,自动选择最优模型/尺寸volcano_signer.py 封装 Bearer Token 头generate_image.py 发送请求,处理响应| 参数 | 说明 | 示例值 |
|---|---|---|
model | 模型 ID | doubao-seedream-4-0-250828 |
prompt | 提示词(支持中英文) | "一只猫坐在夕阳下" |
size | 图片尺寸 | "1024x1024" / "2K" / "4K" |
response_format | 返回格式 | "url" 或 "b64_json" |
n | 批量生成数量 | 1~4 |
watermark | 是否加水印 | false |
seed | 随机种子(可复现) | -1 |
guidance_scale | 提示词引导强度 | 7.5 |
API Endpoint: https://ark.cn-beijing.volces.com/api/v3/images/generations
| 模型 | 尺寸 | 参考价格/张 | 适用场景 |
|---|---|---|---|
doubao-seedream-3-0-t2i-250415 | 1024×1024 | ~¥0.12 | 日常生图,性价比高 |
doubao-seedream-4-0-250828 | 1024×1024 | ~¥0.20 | 高质量,商业场景 |
doubao-seedream-4-0-250828 | 2K | ~¥0.35 | 高清输出 |
doubao-seedream-4-0-250828 | 4K | ~¥0.60 | 超高清,海报/印刷 |
价格以火山引擎官方控制台公示为准,此处仅供参考。
cd volcano-image-generator
cp config.example.json config.json
# 编辑 config.json,填入 ARK_API_KEYpython scripts/generate_image.py \
--prompt "星空下的雪山,超写实风格" \
--size 1024x1024 \
--output ./output/python scripts/generate_image.py \
--prompt "赛博朋克城市夜景" \
--n 4 \
--budget 2.0 \ # 总预算上限(元)
--output ./output/python scripts/cost_manager.py --reportcost_manager.py 实现以下策略:
daily_limit / per_call_limitcost_log.json 记录每日/每月用量generate_image.py 内置指数退避重试:
第1次失败 → 等待 1s 重试
第2次失败 → 等待 2s 重试
第3次失败 → 等待 4s 重试
第3次仍失败 → 抛出最终异常可重试错误:429 限流、502/503/504 服务暂时不可用、网络超时 不可重试错误:401 认证失败、400 参数错误、内容安全拦截
scripts/generate_image.py — 主逻辑,含重试scripts/volcano_signer.py — API Key 管理scripts/cost_manager.py — 预算/追踪/降级config.example.json — 所有可配置项说明~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.