imagegen

Generate or edit images via the OpenAI Image API with prompts and masks.

2|Updated Feb 18, 2026
One-click install
npx skills add https://github.com/alanharrryy-wq/hitech-os --skill imagegen-alanharrryy-wq
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: imagegen
Source: https://github.com/alanharrryy-wq/hitech-os/tree/main/.agents/skills/B_worker/imagegen
Command: npx skills add https://github.com/alanharrryy-wq/hitech-os --skill imagegen-alanharrryy-wq

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill enables you to generate and edit images programmatically using the OpenAI Image API, simplifying asset creation and visual exploration.

Core Features & Use Cases

  • Generate new images from prompts (with optional batch mode) for websites, apps, or marketing assets.
  • Edit existing images (inpainting, background changes, or masking) using the bundled CLI.
  • Batch processing and deterministic workflows via the provided script (scripts/image_gen.py) and prompts augmentation.

Quick Start

Run the bundled CLI (scripts/image_gen.py) with a prompt to generate or edit images, ensuring OPENAI_API_KEY is set.

Frequently Asked Questions about imagegen

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

FAQPage Schema
How do I generate images from prompts using the OpenAI Image API in Python?

Generate images from prompts using the OpenAI Image API in Python by running the bundled CLI script with your text prompt. Ensure the OpenAI Python SDK is installed and your OPENAI_API_KEY environment variable is set for successful image generation.

Can I batch generate images with OpenAI API and apply edits like background changes?

Yes, you can batch generate images and apply edits like background changes using OpenAI API. The bundled CLI supports batch jobs, optional masks for inpainting, and validates inputs for size and quality across design workflows.

Do I need an OPENAI_API_KEY to edit existing images with masking?

Yes, you need an OPENAI_API_KEY to edit existing images with masking. The image editing process uses the OpenAI Image API, which requires the OpenAI Python SDK installed and a valid API key configured in your environment.

What's the best way to handle retries and output management for OpenAI image generation?

The best way to handle retries and output management for OpenAI image generation is using the bundled CLI script. It automatically validates image parameters, manages batch processing, handles retries, and organizes your generated or edited image outputs.

Does the OpenAI Image API support transparent backgrounds and multi-image prompts?

Yes, the OpenAI Image API supports transparent backgrounds and multi-image prompts. The CLI validates background parameters and applies masks to existing images, enabling complex visual edits across product and marketing asset workflows.