openai-image-gen

Generate AI images from prompts via the OpenAI Images API and compile an HTML gallery.

Updated Dec 6, 2016
One-click install
npx skills add https://github.com/majunbao/learn --skill openai-image-gen-majunbao
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: openai-image-gen
Source: https://github.com/majunbao/learn/tree/main/openclaw_tags/openclaw-2026.3.2/skills/openai-image-gen
Command: npx skills add https://github.com/majunbao/learn --skill openai-image-gen-majunbao

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Generating multiple AI-generated images for creative exploration and quick visual assets, while keeping outputs organized in a browsable gallery.

Core Features & Use Cases

  • Random prompt sampler to produce diverse prompts.
  • Batch image generation via the OpenAI Images API with model-aware defaults.
  • Automatic gallery creation including an index.html and prompts.json for easy browsing and reuse.

Quick Start

Run python3 {baseDir}/scripts/gen.py to generate a batch of images using your OpenAI API key.

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 AI images and organize them into a browsable gallery?▼

Batch-generate AI images by running a Python script that calls the OpenAI Images API with diverse prompts, then automatically compiles outputs into an index.html gallery and prompts.json file for easy browsing and reuse.

Do I need an OpenAI API key to generate AI images in bulk?▼

Yes, you need an OpenAI API key to generate AI images in bulk. The script requires the OPENAI_API_KEY environment variable to be set so it can authenticate requests to the OpenAI Images API during batch processing.

Can I generate diverse AI image prompts automatically for creative exploration?▼

You can generate diverse AI image prompts automatically using the built-in random prompt sampler. It produces varied inputs for the OpenAI Images API, enabling broad creative exploration and quick visual asset generation across multiple models.

What files are created when generating a batch of AI images?▼

When generating a batch of AI images, the script creates image files, an index.html for visual browsing, and a prompts.json file containing the exact text inputs used. These artifacts ensure outputs remain organized and reusable.

How does batch image generation work with different OpenAI models?▼

Batch image generation uses model-aware defaults to adapt API requests for different OpenAI image models. The script handles parameter selection automatically, allowing you to generate quick visual assets without manual model configuration.