openai-image-gen

Generate batches of images via the OpenAI Images API with a random prompt sampler and HTML gallery output.

Updated Feb 16, 2026
One-click install
npx skills add https://github.com/travis-burmaster/agentbox --skill openai-image-gen-travis-burmaster
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: openai-image-gen
Source: https://github.com/travis-burmaster/agentbox/tree/main/agentfork/skills/openai-image-gen
Command: npx skills add https://github.com/travis-burmaster/agentbox --skill openai-image-gen-travis-burmaster

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Manually crafting prompts and calling the OpenAI Images API one request 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: Generate multiple images in one run using GPT image models, DALL-E 3, or DALL-E 2 with model-aware defaults for size and quality. - Random Prompt Sampler: Automatically compose varied prompts from subject, style, and lighting combinations when no prompt is provided. - HTML Gallery Output: Produce an index.html thumbnail gallery plus a prompts.json mapping for every run. - Use Case: A designer needs 16 concept variations of product imagery; run the script with --count 16 --model gpt-image-1 and open the generated gallery to review all results at once. ## Quick Start Run the gen.py script with your OPENAI_API_KEY set to generate a batch of images and open the resulting 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 batch generate images with the OpenAI Images API?

Run the gen.py script with python3 and set the --count flag to the number of images you want. It sends one request per prompt to the OpenAI Images API and saves all results with an HTML gallery.

How to generate images with DALL-E 3 from the command line?

Pass --model dall-e-3 to the script along with optional --size, --quality hd, and --style vivid or natural flags. Note that DALL-E 3 only supports one image per request, so the count is automatically limited to 1.

What image sizes does gpt-image-1 support compared to dall-e-3?

GPT image models support 1024x1024, 1536x1024, 1024x1536, and auto, while dall-e-3 supports 1024x1024, 1792x1024, and 1024x1792. The script applies the correct default size per model if none is specified.

Can I generate transparent background images with the OpenAI API?

Yes, GPT image models support a --background transparent flag, and you can also set --output-format to png, jpeg, or webp. These parameters are not available for dall-e-2 or dall-e-3.

Why does the script say Missing OPENAI_API_KEY?

The script reads your API key from the OPENAI_API_KEY environment variable and exits with an error if it is unset or empty. Export the variable in your shell before running the script.