openai-image-gen

Generate images via the OpenAI Images API with batch prompts and an HTML gallery.

Updated Jun 15, 2026
One-click install
npx skills add https://github.com/redlanternstudios/swarmclaw --skill openai-image-gen-redlanternstudios
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openai-image-gen
Source: https://github.com/redlanternstudios/swarmclaw/tree/main/skills/openai-image-gen
Command: npx skills add https://github.com/redlanternstudios/swarmclaw --skill openai-image-gen-redlanternstudios

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Creating images through the OpenAI Images API normally requires writing custom request code, handling model-specific parameters, and organizing output files manually. This Skill wraps that entire flow into a single script that generates images, saves them with descriptive filenames, and builds a browsable HTML gallery. ## Core Features & Use Cases - Multi-Model Support: Works with GPT image models (gpt-image-1, gpt-image-1-mini, gpt-image-1.5), DALL-E 3, and DALL-E 2, applying correct size, quality, style, background, and output-format parameters per model. - Batch Generation with Prompt Sampler: Generate multiple images at once using either a custom prompt or randomly composed prompts mixing subjects, styles, and lighting. - Organized Output: Produces image files, a prompts.json mapping, and an index.html thumbnail gallery for quick review in a browser. - Use Case: Ask for 16 variations of a product concept with gpt-image-1, then open the generated index.html to compare all renders side by side. ## Quick Start Generate four images of a lobster astronaut using the OpenAI image generation skill and show me the 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 images with the OpenAI Images API from the command line?

Run the gen.py script with python3 after setting the OPENAI_API_KEY environment variable. Pass --prompt for a specific description or omit it to use randomly composed prompts, and control volume with --count.

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

GPT image models support high/medium/low quality, transparent backgrounds, and png, jpeg, or webp output formats. DALL-E 3 supports vivid or natural styles and hd quality but only generates one image per request.

Can I generate transparent background images with OpenAI?

Yes, GPT image models support the --background transparent flag, which the script passes to the API. DALL-E models do not support this parameter, and the script warns and ignores it for those models.

Why does dall-e-3 only generate one image when I set a higher count?

The DALL-E 3 API only accepts n=1 per 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 in one run.

What image sizes does the OpenAI Images API support?

GPT image models accept 1024x1024, 1536x1024, and 1024x1536. DALL-E 3 accepts 1024x1024, 1792x1024, and 1024x1792, while DALL-E 2 supports 256x256, 512x512, and 1024x1024.