volcengine-doubao-image-gen
豆包图片生成。使用火山引擎 API 生成图片。触发词:豆包图片、doubao、生成图片、火山引擎、字节跳动图片生成。
MIT-0 · Free to use, modify, and redistribute. No attribution required.
⭐ 0 · 33 · 1 current installs · 1 all-time installs
MIT-0
Security Scan
OpenClaw
Suspicious
medium confidencePurpose & Capability
The name/description, SKILL.md, and scripts/generate_image.py are all consistent: they call Volcengine (Ark) image-generation endpoints and save the returned image. However, the registry metadata lists no required environment variables or primary credential, while the README and script require an ARK_API_KEY. This is likely an omission but is an inconsistency.
Instruction Scope
SKILL.md directs the agent/user to run the included Python script, supply a prompt, and provide an API key via --api-key or ARK_API_KEY. The instructions do not ask the agent to read unrelated files, environment variables, or system paths beyond the API key, nor do they post data to endpoints other than the stated Volcengine API and the returned image URL.
Install Mechanism
There is no install script or external download; the skill is instruction/script-based and includes a local Python script. Nothing in the install process writes or fetches arbitrary code from third-party URLs.
Credentials
The skill legitimately needs a single API credential (ARK_API_KEY) to call the Volcengine API, which is proportionate. However, the package registry metadata does not declare this required environment variable/primary credential — that mismatch is a concern because automated permission reviews or users may not be warned that a secret is needed.
Persistence & Privilege
The skill does not request always:true, does not modify other skills or system-wide configuration, and has no persistence or elevated privileges. Autonomous invocation is enabled by default and is not by itself flagged.
What to consider before installing
This skill appears to do what it says: call Volcengine/Ark to generate images and download the returned URL. Before installing or running it, note the following: (1) the registry metadata did NOT declare the required API key, but both SKILL.md and the script require ARK_API_KEY — treat that as an oversight and verify you are comfortable providing a Volcengine API key. (2) Confirm the API endpoint (https://ark.cn-beijing.volces.com/...) matches the official Volcengine/Ark documentation you trust. (3) Only provide an API key scoped/minimized for image-generation (avoid using broad or account-level keys). (4) Because the skill source is unknown, consider reviewing the script yourself (it is short and readable) and run in an isolated environment if you are concerned. If the registry metadata were corrected to declare ARK_API_KEY as the sole required credential, this assessment would likely change to benign; if the skill later requested unrelated credentials or performed unexpected network calls, treat it as more risky.Like a lobster shell, security has layers — review code before you run it.
Current versionv1.0.1
Download ziplatest
License
MIT-0
Free to use, modify, and redistribute. No attribution required.
SKILL.md
豆包图片生成
使用火山引擎豆包 API 生成图片。
快速开始
# 设置 API Key
export ARK_API_KEY="your-api-key"
# 生成图片
python3 scripts/generate_image.py --prompt "一只可爱的猫咪" --filename "cat.png"
参数说明
| 参数 | 说明 | 默认值 |
|---|---|---|
--prompt / -p | 图片描述(必填) | - |
--filename / -f | 输出文件名 | 自动生成 |
--size / -s | 图片尺寸 (1K/2K/4K) | 2K |
--api-key / -k | API Key | 环境变量 ARK_API_KEY |
--no-watermark | 不添加水印 | 默认有水印 |
--model / -m | 模型名称 | doubao-seedream-5-0-260128 |
使用示例
基本用法:
python3 scripts/generate_image.py --prompt "星空下的城市夜景,赛博朋克风格" --filename "city.png"
指定尺寸:
python3 scripts/generate_image.py --prompt "一只可爱的猫咪" --size 4K --filename "cat-4k.png"
不添加水印:
python3 scripts/generate_image.py --prompt "山水画" --no-watermark --filename "landscape.png"
通过命令行传递 API Key:
python3 scripts/generate_image.py \
--prompt "描述" \
--filename "output.png" \
--api-key "your-api-key"
API Key 获取
- 访问火山引擎控制台:https://console.volcengine.com/ark
- 创建或选择一个接入点
- 获取 API Key
提示词技巧
好的提示词示例:
星际穿越,黑洞,黑洞里冲出一辆快支离破碎的复古列车,电影大片,末日既视感,动感,对比色,oc渲染,光线追踪,动态模糊,景深,超现实主义,深蓝,质感真实,暗黑风背景的光影效果
提示词结构建议:
- 主体描述(是什么)
- 场景/环境(在哪里)
- 风格(赛博朋克、水彩、油画等)
- 光影效果
- 氛围/情绪
注意事项
- API Key 安全:不要将 API Key 硬编码在脚本中,使用环境变量
- 图片尺寸:尺寸越大生成时间越长
- 水印:默认添加水印,使用
--no-watermark可去除 - 超时:生成可能需要 30-60 秒,请耐心等待
故障排查
错误:No API key provided
- 设置环境变量:
export ARK_API_KEY="your-key" - 或使用
--api-key参数
错误:API Error 401
- API Key 无效或过期
- 检查火山引擎控制台确认 Key 状态
错误:API Error 429
- 请求频率超限
- 稍后重试
错误:Network Error
- 网络连接问题
- 检查网络或代理设置
Files
2 totalSelect a file
Select a file to preview.
Comments
Loading comments…
