‹ 首页

openai-image-gen

@swarmclawai · 收录于 昨天 · 上游提交 2 周前

Generate images via OpenAI Images API (GPT Image, DALL-E 3, DALL-E 2). Supports batch generation with random prompt sampler and HTML gallery output. Use when asked to generate images with OpenAI and an OPENAI_API_KEY is available.

适合你,如果需要用OpenAI API批量生成图片并预览

/ 通过 npx 安装 校验哈希
npx oh-my-skill add swarmclawai/swarmclaw/openai-image-gen
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- swarmclawai/swarmclaw/openai-image-gen
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify swarmclawai/swarmclaw/openai-image-gen
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
611GitHub stars
~595最小装载
~595含声明引用
~2.7K文本包总量
索引托管

怎么用

技能原文 SKILL.md作者撰写 · MIT · ed38ba5

OpenAI Image Gen

Generate images via the OpenAI Images API with an HTML gallery viewer.

Run

Note: Image generation can take longer than typical timeouts. Set a higher timeout when running via shell (e.g., 300 seconds).

python3 {baseDir}/scripts/gen.py
Useful Flags
# GPT image models with various options
python3 {baseDir}/scripts/gen.py --count 16 --model gpt-image-1
python3 {baseDir}/scripts/gen.py --prompt "ultra-detailed studio photo of a lobster astronaut" --count 4
python3 {baseDir}/scripts/gen.py --size 1536x1024 --quality high --out-dir ./out/images
python3 {baseDir}/scripts/gen.py --model gpt-image-1.5 --background transparent --output-format webp

# DALL-E 3 (note: count is automatically limited to 1)
python3 {baseDir}/scripts/gen.py --model dall-e-3 --quality hd --size 1792x1024 --style vivid
python3 {baseDir}/scripts/gen.py --model dall-e-3 --style natural --prompt "serene mountain landscape"

# DALL-E 2
python3 {baseDir}/scripts/gen.py --model dall-e-2 --size 512x512 --count 4
Model-Specific Parameters
Size
  • GPT image models (gpt-image-1, gpt-image-1-mini, gpt-image-1.5): 1024x1024, 1536x1024 (landscape), 1024x1536 (portrait), or auto. Default: 1024x1024
  • dall-e-3: 1024x1024, 1792x1024, or 1024x1792. Default: 1024x1024
  • dall-e-2: 256x256, 512x512, or 1024x1024. Default: 1024x1024
Quality
  • GPT image models: auto, high, medium, or low. Default: high
  • dall-e-3: hd or standard. Default: standard
  • dall-e-2: standard only
Other Parameters
  • GPT image models support --background (transparent, opaque, auto) and --output-format (png, jpeg, webp)
  • dall-e-3 supports --style (vivid for hyper-real, natural for more natural looking)
  • dall-e-3 only supports n=1; the script automatically limits count to 1
Output
  • Image files (*.png, *.jpeg, or *.webp depending on model and format)
  • prompts.json (prompt-to-file mapping)
  • index.html (thumbnail gallery — open in browser to review)
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。