Openai Image Gen

Batch-generate images via OpenAI Images API. Random prompt sampler + `index.html` gallery.

Peter Steinberger

@steipete

What This Skill Does

Batch-generates images from structured or random prompts using the OpenAI Images API, then outputs PNG files, a prompt-to-file mapping, and an interactive HTML thumbnail gallery.

Replaces manually submitting each prompt to the OpenAI API and assembling a gallery by automating the entire batch generation and presentation workflow.

When to Use It

  • Generate a set of concept art variations from a base prompt
  • Create multiple product mockup images for A/B testing
  • Produce a gallery of themed illustrations for a presentation
  • Rapidly prototype visual ideas with random prompt sampling
  • Build a local image library for a creative project or mood board

Install

$ openclaw skills install @steipete/openai-image-gen

OpenAI Image Gen

Generate a handful of “random but structured” prompts and render them via OpenAI Images API.

Setup

  • Needs env: OPENAI_API_KEY

Run

From any directory (outputs to ~/Projects/tmp/... when present; else ./tmp/...):

python3 ~/Projects/agent-scripts/skills/openai-image-gen/scripts/gen.py
open ~/Projects/tmp/openai-image-gen-*/index.html

Useful flags:

python3 ~/Projects/agent-scripts/skills/openai-image-gen/scripts/gen.py --count 16 --model gpt-image-1.5
python3 ~/Projects/agent-scripts/skills/openai-image-gen/scripts/gen.py --prompt "ultra-detailed studio photo of a lobster astronaut" --count 4
python3 ~/Projects/agent-scripts/skills/openai-image-gen/scripts/gen.py --size 1536x1024 --quality high --out-dir ./out/images

Output

  • *.png images
  • prompts.json (prompt ↔ file mapping)
  • index.html (thumbnail gallery)

Top skills in this category