About openai-image-gen
openai-image-gen is a script-based skill for generating structured image prompts and rendering them with the OpenAI Images API. It suits people creating batches of images, with PNGs, a prompt-to-file mapping, and an HTML thumbnail gallery as output.
Key features
- 01Generate structured image prompts
- 02Render images with OpenAI Images API
- 03Set prompt count, model, size, and quality
- 04Save PNGs, prompt mapping, and HTML gallery
Use cases
- 01Create a batch of images from generated prompts
- 02Render images from a supplied prompt
- 03Review generated images in a thumbnail gallery
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ steipete/ agent-scripts --skill openai-image-genAfter installing, type/openai-image-genin Claude Code to confirm it loaded.
Bundled filesscripts/gen.py
Details
From the project READMEOpenAI 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
*.pngimagesprompts.json(prompt ↔ file mapping)index.html(thumbnail gallery)
Comments
Markdown supported