imagegen

Generate and edit images via the OpenAI Image API with a Python CLI.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Automates image generation and editing using the OpenAI Image API, reducing manual design work and accelerating asset creation.

Core Features & Use Cases

  • Generate new images from prompts using the bundled CLI.
  • Edit existing images with optional masks (inpainting, background changes, or object edits).
  • Batch generate multiple variants for campaigns or iterations.
  • Deterministic runs and output management via the bundled CLI.

Quick Start

Run the bundled CLI (scripts/image_gen.py) to generate or edit images with a sample prompt.

Frequently Asked Questions about imagegen

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

FAQPage Schema
How do I automate image generation and batch variant creation for campaigns?

You can automate image generation and batch variant creation by running the bundled Python CLI to manage prompts, sizes, and outputs with retry support. The script processes multiple iterations automatically to reduce manual asset creation.

Can I edit existing images and apply masks for inpainting using the OpenAI Image API?

Yes, you can edit existing images and apply masks for inpainting or background changes using the OpenAI Image API. The CLI supports optional masks to isolate and modify specific regions within your image file.

Do I need the OpenAI SDK and Python to use this image editing CLI?

Yes, you need the OpenAI SDK and Python to use this image editing CLI. The tool requires a Python environment to execute scripts, process images via Pillow, and communicate with the OpenAI API.

What is the best way to manage prompt augmentation and output sizes for generated images?

The best way to manage prompt augmentation and output sizes is through the bundled CLI, which provides deterministic runs and output management. It directly configures sizes, backgrounds, and prompt parameters for the OpenAI Image API.

Are there limitations when using Python CLI tools for batch image generation?

Batch image generation limitations depend on OpenAI API rate limits and local processing constraints. While the CLI provides retry support for batch operations, large campaigns may still encounter execution bottlenecks or API rate restrictions.