openai-image-gen

Generate batches of images via the OpenAI Images API with an HTML gallery output.

1|Updated Mar 3, 2026
One-click install
npx skills add https://github.com/Cyandex/ErnOS --skill openai-image-gen-cyandex
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: openai-image-gen
Source: https://github.com/Cyandex/ErnOS/tree/main/skills/openai-image-gen
Command: npx skills add https://github.com/Cyandex/ErnOS --skill openai-image-gen-cyandex

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Manually crafting prompts and calling the OpenAI Images API one image at a time is slow and repetitive. This Skill automates batch image generation with structured random prompts and organizes results into a browsable gallery. ## Core Features & Use Cases - Batch Image Generation: Create multiple images in one run using GPT image models (gpt-image-1, gpt-image-1.5) or DALL-E 2/3, with model-specific size, quality, style, background, and output-format parameters handled automatically. - Random Prompt Sampler: Combines subjects, styles, and lighting descriptors into varied prompts when no explicit prompt is given. - HTML Gallery Output: Produces an index.html thumbnail gallery plus a prompts.json mapping for every run. - Use Case: A designer needs 16 concept variations of a product photo; run the script with --count 16 --model gpt-image-1 and open the generated gallery to review all options at once. ## Quick Start Run the gen.py script with your desired count and model, making sure the OPENAI_API_KEY environment variable is set, then open the generated index.html gallery.

Frequently Asked Questions about openai-image-gen

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate multiple images with the OpenAI Images API?▼

Run the gen.py script with the --count flag to batch-generate images in one command. Each prompt is sent as a separate API request, and results are saved to a timestamped output directory with an HTML gallery.

What is the difference between gpt-image-1 and dall-e-3 for image generation?▼

GPT image models support transparent backgrounds, webp/jpeg output formats, and multiple images per run, while dall-e-3 is limited to one image per request but offers a style parameter (vivid or natural). Size and quality options also differ between the models.

Why does dall-e-3 only generate one image at a time?▼

The dall-e-3 model only accepts n=1 per API request, so the script automatically reduces the count to 1 and prints a warning. Use a GPT image model or dall-e-2 if you need multiple images per run.

Does the OpenAI image generation script require an API key?▼

Yes, the script reads the OPENAI_API_KEY environment variable and exits with an error if it is missing. Set the variable in your shell before running gen.py.

Can I generate transparent background images with the OpenAI API?▼

Yes, GPT image models support a --background transparent flag along with --output-format webp, png, or jpeg. DALL-E models do not support background transparency.