Skip to content
Development
Skill

/openai-image-gen

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.

From plugin
swarmclaw
70911 skills

Claude Code

$ npx -y skills add swarmclawai/swarmclaw --skill openai-image-gen --agent claude-code

SKILL.md

openai-image-gen.SKILL.md
name: openai-image-gen
description: 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.
metadata:
  {
    "openclaw":
      {
        "emoji": "🎨",
        "requires": { "bins": ["python3"], "env": ["OPENAI_API_KEY"] },
        "primaryEnv": "OPENAI_API_KEY",
        "install":
          [
            {
              "id": "python-brew",
              "kind": "brew",
              "formula": "python",
              "bins": ["python3"],
              "label": "Install Python (brew)",
            },
          ],
      },
  }

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)
Read more
@swarmclawai
Ships withswarmclaw

The self-hosted AI agent runtime and multi-agent framework for autonomous agents. Open-source agent swarms with durable agent memory, MCP tools, skills, delegation, schedules, and 23+ LLM providers — a practical Claude Code and LangChain alternative.

Stars on GitHub

Momentum

stars in total
709
Star history of swarmclawai/swarmclaw on GitHub, a chart by star-history.com

Other skills on swarmclaw.

coding-agent

coding-agent

Delegate coding tasks to external coding agents (Claude Code, Codex, Pi, OpenCode) via shell. Use when: (1) building new features…

github

github

GitHub operations via `gh` CLI: issues, PRs, CI runs, code review, API queries. Use when: (1) checking PR status or CI, (2)…

nano-banana-pro

nano-banana-pro

Generate or edit images via Gemini 3 Pro Image (Nano Banana Pro). Use when asked to create, generate, or edit images and a Gemini…

nano-pdf

nano-pdf

Edit or create PDFs with natural-language instructions using the nano-pdf CLI. Use when asked to make a PDF, edit a PDF, add…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills10d309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc12d293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react1d252k
@facebook@facebookInstall Skill

Questions about openai-image-gen.

Which coding agents can use openai-image-gen?
openai-image-gen installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.