← Back to Skills Marketplace
etmnb

Doubao Seedream Gen

by Etmnb · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ✓ Security Clean
104
Downloads
0
Stars
1
Active Installs
2
Versions
Install in OpenClaw
/install doubao-seedream-gen
Description
调用豆包 Seedream 模型生成图片。新用户通过火山「协作奖励计划」免费使用顶级模型。 支持文生图+图生图,智能调度 4.5→5.0Lite→4.0,每模型每日18次,超限拒绝。 Use when: 用户输入中含触发词(/img /draw /gen 生成图片 画图 搞个图 generate image tx...
README (SKILL.md)

豆包图片生成 Skill

调用火山方舟 Seedream API 生成/编辑图片,自动选择模型并限制用量。

触发词(精确匹配,不触发不调用)

触发词 例子
/img /image /draw /gen /generate /pic /img 一只猫
生成图片 画一张图 创建图片 制作图片 生成图片 海边落日 4K
图生图 img2img image to image edit this image 图生图 换背景 url
极致生成: 快速草稿: 艺术风格: 极致生成: 赛博朋克城市
generate image create image txt2img generate image a cat 2K
画图 帮我画 帮我生成 我想生成 搞个图 来张图 帮我画一只柴犬
please generate please draw I want to generate please draw a sunset

工作流程

调用 doubao_image_gen.py 脚本:

  1. 检测触发词 — 从用户输入提取 prompt、size、style、图生图标记
  2. 模型选择 — 按 4.5 → 5.0Lite → 4.0 降级,满 18 次跳过
  3. 尺寸解析2K(2048²) / 4K(4096²) / 16:9 / 1920x1080 / 4K+16:9→5461×3072
  4. 调用 APIPOST https://ark.cn-beijing.volces.com/api/v3/images/generations
  5. 保存图片 — 下载到 Image/,命名:内容分辨率-模型-时间.png
  6. 记录历史 — 写入 image_gen_history.json,7 天自动清理

调用方式

from doubao_image_gen import DoubaoImageGenerator
g = DoubaoImageGenerator()

# 文生图
g.generate_text_to_image("提示词", size="2K")           # 默认 2K
g.generate_text_to_image("提示词", size="4K", ratio="16:9")  # 4K+宽屏
g.generate_text_to_image("提示词", size="1920x1080")    # 精准分辨率

# 图生图
g.generate_image_to_image("编辑指令", image_url="https://...")

# 组图
g.generate_sequence("提示词", max_images=4)

# 查看状态
g.get_status()

# 强制模型
g.generate_text_to_image("提示词", force_model="Doubao-Seedream-4.0")

尺寸

方式 写法 结果
预设 2K / 4K 2048² / 4096²
预设+比例 4K + ratio="16:9" 5461×3072
比例 16:9 1:1 4:3 21:9 推荐分辨率
精准 1920x1080 最大 16,777,216 px

模型

模型 优先级 ID
Seedream-4.5 1 doubao-seedream-4-5-251128
Seedream-5.0-Lite 2 doubao-seedream-5-0-260128
Seedream-4.0 3 doubao-seedream-4-0-250828

每模型每日 18 次,全部超限返回 {"success":false,"error":"..."}

配置与获取密钥

🎁 火山「协作奖励计划」:新用户注册火山方舟即可免费使用 Seedream-4.5/5.0-Lite/4.0 等顶级生图模型,无需预充值。详情见 火山方舟控制台

1. ARK_API_KEY(必填 — 用于生成图片)

在火山方舟控制台创建 API Key:

  1. 打开 https://console.volcengine.com/arkAPI Key 管理
  2. 点击「创建 API Key」,复制生成的 ark-xxx 字符串
export ARK_API_KEY="ark-your-key-here"

2. IAM 密钥(可选 — 用于自动同步用量)

用量同步需要火山云 IAM 密钥(Access Key + Secret Key):

  1. 打开 https://console.volcengine.com/iam访问控制 → 用户
  2. 创建用户或选择已有用户 → 密钥管理
  3. 生成 Access Key,保存 AccessKeyIdSecretAccessKey
export VOLCENGINE_ACCESS_KEY="AKLTxxx"
export VOLCENGINE_SECRET_KEY="your-secret"

不配 IAM 密钥也能正常生成图片,只是无法从控制台自动同步已用量。

3. 模型接入点 ID(必填 — 三个模型各需一个)

在火山方舟控制台为三个 Seedream 模型分别创建接入点:

  1. 打开 https://console.volcengine.com/ark在线推理
  2. 分别创建 Seedream-4.5、Seedream-5.0-Lite、Seedream-4.0 的接入点
  3. 复制各接入点的 Model ID(如 doubao-seedream-4-5-251128
export DOUBAO_MODEL_45_ID="doubao-seedream-4-5-251128"   # 必填
export DOUBAO_MODEL_50L_ID="doubao-seedream-5-0-260128"  # 必填
export DOUBAO_MODEL_40_ID="doubao-seedream-4-0-250828"   # 必填

文件

文件 说明
doubao_image_gen.py 核心脚本
image_gen_history.json 调用历史+计数+端点缓存
Image/ 生成图片保存目录
Usage Guidance
Treat this as an incomplete low-confidence pass. Re-run the review with metadata.json and artifact files accessible so the skill instructions, install behavior, and file contents can be evaluated directly.
Capability Tags
requires-sensitive-credentials
Capability Assessment
Purpose & Capability
Artifact files could not be inspected in this run, so purpose-capability coherence could not be confirmed from metadata.json or artifact contents.
Instruction Scope
No instruction-scope concern is supported by readable artifact evidence in this run.
Install Mechanism
Install mechanism could not be reviewed because workspace file inspection failed before metadata or artifact files could be read.
Credentials
No environment-proportionality concern is supported by readable artifact evidence in this run.
Persistence & Privilege
No persistence or privilege concern is supported by readable artifact evidence in this run.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install doubao-seedream-gen
  3. After installation, invoke the skill by name or use /doubao-seedream-gen
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.1.0
接入点必填,移除默认值
v1.0.0
doubao-seedream-gen v1.0.0 - Initial release of the doubao-seedream-gen skill. - Supports text-to-image and image-to-image generation via Volcano Seedream API. - Auto-selects between Seedream-4.5, 5.0-Lite, and 4.0 models with daily usage limits. - Includes detailed trigger words, usage instructions, and configuration in SKILL.md. - Free usage for new users through Volcano's "Collaboration Reward Program."
Metadata
Slug doubao-seedream-gen
Version 1.1.0
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 2
Frequently Asked Questions

What is Doubao Seedream Gen?

调用豆包 Seedream 模型生成图片。新用户通过火山「协作奖励计划」免费使用顶级模型。 支持文生图+图生图,智能调度 4.5→5.0Lite→4.0,每模型每日18次,超限拒绝。 Use when: 用户输入中含触发词(/img /draw /gen 生成图片 画图 搞个图 generate image tx... It is an AI Agent Skill for Claude Code / OpenClaw, with 104 downloads so far.

How do I install Doubao Seedream Gen?

Run "/install doubao-seedream-gen" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Doubao Seedream Gen free?

Yes, Doubao Seedream Gen is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Doubao Seedream Gen support?

Doubao Seedream Gen is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Doubao Seedream Gen?

It is built and maintained by Etmnb (@etmnb); the current version is v1.1.0.

💬 Comments