Skip to content
Skillpedia
Images & icons7.4k · #13240

openai-image-gen

What it does

This skill generates several images from a set of prompts using OpenAI's image API, then builds a gallery page for review. It is for people who want to explore many image ideas quickly.

When to use it

  • ✓When you want several image ideas generated at once.
  • ✓When you want a gallery to compare images side by side.
  • ✓When you want to render one specific prompt with a chosen size and quality.

Skill link

https://github.com/steipete/agent-scripts/blob/main/skills/openai-image-gen/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/steipete/agent-scripts/blob/main/skills/openai-image-gen/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“Generate four images of a lobster astronaut in a studio photo style, and show them in a gallery I can scroll.”

5 new skills a week. 1 minute to read.

How it works

The agent builds a set of structured prompts, or uses yours, sends them to the OpenAI image service, and saves the files with a prompt list and a thumbnail gallery page.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

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)
FAQ

What do I need to set up?

An OpenAI API key in the OPENAI_API_KEY environment setting.

What files does it produce?

Image files, a prompts file that matches each image, and an index page with thumbnails.

Can I choose the size and quality?

Yes. Options include image size, quality, count, and model.

Details

Original description by the author

OpenAI Images API: batches, prompt sampler, gallery.

repo: steipete/agent-scripts

Popularity

GitHub stars
7.4k
Ranking position
#13240
License
MIT
Updated
10/30/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills