imagegen

Generate and edit images via the OpenAI Image API in a CLI workflow.

Updated Feb 5, 2026
One-click install
npx skills add https://github.com/syl2042/codex_skills --skill imagegen-syl2042
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: imagegen
Source: https://github.com/syl2042/codex_skills/tree/main/imagegen
Command: npx skills add https://github.com/syl2042/codex_skills --skill imagegen-syl2042

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires openai, Pillow, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Generates and edits images efficiently by leveraging the OpenAI Image API through a self-contained CLI workflow.

Core Features & Use Cases

  • Generate new visuals (concept art, product shots, UI assets) from prompts.
  • Edit existing images (inpainting, background removal, masking) using the bundled CLI.
  • Batch process multiple prompts to generate variants and outputs.

Quick Start

Run the bundled CLI scripts/image_gen.py to generate or edit images using your prompts, with OPENAI_API_KEY configured.

Frequently Asked Questions about imagegen

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

FAQPage Schema
How do I batch process OpenAI image generation prompts via CLI?

Batch processing OpenAI image generation prompts via CLI is handled by running the bundled script, which validates inputs and outputs multiple image variants from a configured list of prompts. You simply execute the CLI script with your prompts to generate batch outputs.

Can I edit existing images and do inpainting using the OpenAI Image API?

Editing existing images and performing inpainting using the OpenAI Image API is fully supported within the CLI workflow. The bundled script applies masking and background removal techniques to modify your visuals directly.

Do I need an OPENAI_API_KEY to generate images with a CLI script?

You need an OPENAI_API_KEY configured in your environment to generate images with the CLI script. The workflow strictly enforces this API key requirement to authenticate your requests to the OpenAI Image API.

What is the best way to automate creating UI assets and product shots from prompts?

Automating the creation of UI assets and product shots from prompts is best achieved through a programmable CLI workflow using the OpenAI Image API. This approach handles downscaling and multi-output batches for your visual generation tasks.

Does this image generation workflow handle downscaling and validate inputs?

The image generation workflow handles downscaling and strictly validates inputs before processing your requests. It ensures that all prompt data and configurations meet the required formats before sending them to the OpenAI Image API.

Why use Pillow with OpenAI Image API for batch processing?

Using Pillow with the OpenAI Image API enables robust image editing and downscaling during batch processing. The dependency allows the CLI workflow to manipulate and process generated variants locally before final output.