openai-image-gen

Nsttt's avatarfrom Nsttt

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

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 9, 2026⬇️1downloads

When & Why to Use This Skill

This Claude skill automates the batch generation of images using the OpenAI Images API. It streamlines the creative process by allowing users to generate multiple images from structured or random prompts, automatically organizing the output into a convenient HTML gallery for easy review and selection. It is an essential tool for developers and creators looking to scale their AI-driven visual asset production.

Use Cases

  • Rapid Creative Exploration: Quickly generate a large volume of visual concepts using the random prompt sampler to explore different artistic directions and styles.
  • Marketing Asset Production: Batch-create high-quality images for social media, blog posts, or advertising campaigns with specific themes, sizes, and quality settings.
  • Web Development & Prototyping: Efficiently produce a library of themed images and an index gallery to serve as high-fidelity placeholders or assets for website mockups.
  • Prompt Engineering & Testing: Compare the outputs of different prompts and model parameters side-by-side to optimize AI image generation results for specific projects.
nameopenai-image-gen
descriptionBatch-generate images via OpenAI Images API. Random prompt sampler + `index.html` gallery.

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 ~/tmp/... when present; else ./tmp/...):

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

Useful flags:

python3 ~/git/agents/skills/openai-image-gen/scripts/gen.py --count 16 --model gpt-image-1.5
python3 ~/git/agents/skills/openai-image-gen/scripts/gen.py --prompt "ultra-detailed studio photo of a lobster astronaut" --count 4
python3 ~/git/agents/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)