sjht doubao text to image

v1.0.0

使用豆包 Seedream 模型文生图,支持并发批量生成,输出图库预览页

1· 172·0 current·0 all-time

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for aowind/sjht-doubao-image-gen.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "sjht doubao text to image" (aowind/sjht-doubao-image-gen) from ClawHub.
Skill page: https://clawhub.ai/aowind/sjht-doubao-image-gen
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install sjht-doubao-image-gen

ClawHub CLI

Package manager switcher

npx clawhub@latest install sjht-doubao-image-gen
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
high confidence
Purpose & Capability
Name/description, SKILL.md, and the included script all describe the same functionality (calling doubao-seedream via the Volcengine ARK API to produce images). However, the registry metadata lists no required environment variables while the SKILL.md and scripts expect an API key (ARK_API_KEY). The requested credential is appropriate for the claimed purpose, but the registry omission is an inconsistency.
Instruction Scope
SKILL.md instructs the agent to optimize prompts and invoke the included Python script to generate images. The script reads API key from CLI → ARK_API_KEY env var → ~/.doubao-image-gen/.env, performs HTTP API calls to the ARK endpoint, downloads image URLs, writes files (images, prompts.json, index.html) to the output directory, and prints GENERATED_IMAGE lines for AI consumption. There are no instructions to read unrelated system files or exfiltrate arbitrary data beyond the API-key-based network calls needed for image generation.
Install Mechanism
There is no install spec (instruction-only plus a shipped script). Dependencies are normal Python libs (openai and requests). No remote downloads or obscure install sources are used. The script will require the user/agent to have Python and the noted Python packages available.
Credentials
The only credential the code uses is an ARK API key (ARK_API_KEY), which is proportional to calling the external image generation API. The inconsistency is that the registry metadata did not declare this required environment variable or primary credential; the SKILL.md and script do require it (or CLI flag). No other unrelated secrets or credentials are requested.
Persistence & Privilege
The skill does not request always:true and does not modify other skills or system-wide settings. It writes files only to the specified output directory (or a timestamped folder) and may read a per-user config file in ~/.doubao-image-gen/.env to obtain the API key—this is part of its own configuration scope and not an elevation of privilege.
Assessment
This skill appears to do what it claims (call Volcengine/ARK/doubao Seedream to generate images). Before installing: provide a dedicated ARK API key (the code reads ARK_API_KEY or ~/.doubao-image-gen/.env or --api-key), confirm you are comfortable the agent will make network requests to https://ark.cn-beijing.volces.com and download image URLs, and ensure Python packages (openai, requests) are installed. Note the registry metadata did not declare the ARK_API_KEY requirement — that's likely an omission, not malicious, but verify you only supply API keys you trust and consider keeping the key scoped/limited by the provider. If you need the agent to avoid reading your home dir, remove or relocate any ~/.doubao-image-gen/.env file before use.

Like a lobster shell, security has layers — review code before you run it.

latestvk9704asaevgcaj9g2qxzrxpvx58336h5
172downloads
1stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

豆包文生图 (Doubao Image Gen)

使用火山引擎豆包 doubao-seedream-5-0-260128 模型,根据文字描述生成高质量图像,支持并发批量生成多张图片,并输出图库预览页面。

环境要求

  • Python 3.8+
  • openai 库:pip install "openai>=1.0"

Setup — API Key 配置

API Key 读取优先级(从高到低):

  1. --api-key 命令行参数
  2. 环境变量 ARK_API_KEY
  3. 用户目录 ~/.doubao-image-gen/.env 文件中的 ARK_API_KEY=xxx

获取 API Key:登录 火山方舟控制台 → API Key 管理

Run

# 生成单张图片
python {baseDir}/scripts/gen.py --prompt "赛博朋克风格的上海夜景" --api-key YOUR_KEY

# 并发生成4张(默认并发数=4)
python {baseDir}/scripts/gen.py --prompt "水墨风格的山水画" --count 4 --api-key YOUR_KEY

# 指定尺寸(支持 1024x1024 / 2K / 1280x720 / 720x1280 / 2048x2048)
python {baseDir}/scripts/gen.py --prompt "星空下的草原" --size 2K --api-key YOUR_KEY

# 指定输出目录
python {baseDir}/scripts/gen.py --prompt "古风仙侠" --out-dir ./output --api-key YOUR_KEY

# 从环境变量读取 Key(推荐)
python {baseDir}/scripts/gen.py --prompt "未来城市" --count 2

参数说明

参数默认值说明
--prompt必填图像描述提示词
--count1生成数量(并发执行)
--size2K图像尺寸
--modeldoubao-seedream-5-0-260128模型名称
--out-dir./doubao-output-{时间戳}输出目录
--api-key环境变量ARK API Key
--workers4并发线程数
--watermarkFalse是否添加水印
--dry-runFalse仅打印参数不调用 API

Output

  • *.jpeg 图像文件(按序号命名)
  • prompts.json 提示词与文件的映射记录
  • index.html 图库预览页面(可直接在浏览器打开)

AI 使用指引

当用户说以下内容时,加载本技能并调用脚本:

  • "帮我画一张..." / "生成一张..." / "画个图..."
  • "批量生成 N 张图片"
  • "用豆包生成图片"

标准流程:

  1. 提取或优化用户的提示词(必要时翻译为英文以提升质量)
  2. 调用 python {baseDir}/scripts/gen.py 生成图片
  3. 生成完成后,直接在聊天中以 Markdown 图片形式发送给用户![描述](图片路径或URL)
  4. 同时提供 index.html 预览链接供浏览

示例 Prompt 优化: 用户说"画一只猫"→ 优化为 "A cute cat sitting gracefully, soft studio lighting, photorealistic, 8K detail"

Comments

Loading comments...