# Generate Image

Generate images using AI (OpenAI GPT Image or Stability AI).

- Repository: https://github.com/OpenClaudia/openclaudia-skills (724 stars)
- Category: AI and agents
- License: MIT
- Last updated: 2026-10-29
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add OpenClaudia/openclaudia-skills --skill generate-image -g -a claude-code -y`
Codex: `npx skills add OpenClaudia/openclaudia-skills --skill generate-image -g -a codex -y`
Cursor: `npx skills add OpenClaudia/openclaudia-skills --skill generate-image -g -a cursor -y`
Gemini CLI: `npx skills add OpenClaudia/openclaudia-skills --skill generate-image -g -a gemini-cli -y`

## Description

Generate images using AI (OpenAI GPT Image or Stability AI). Use when the user asks to generate an image, create an AI image, make an illustration, or produce artwork from a text prompt.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# AI Image Generation

Generate images from text prompts using OpenAI GPT Image (gpt-image-2 / gpt-image-1 / variants) or Stability AI (SD 3.5 Large).

## Tool Location

- Script: `~/.agents/tools/generate-image.py`
- Env file: `~/.agents/tools/.env` (contains `OPENAI_API_KEY` and `STABILITY_API_KEY`)

## Available OpenAI image models (verified live via `/v1/models` 2026-05-15)

| Model ID | Notes |
|---|---|
| `gpt-image-2` | **Flagship.** Released 2026-04-21. Best prompt adherence, best photorealism. Default when image quality matters. |
| `gpt-image-2-2026-04-21` | Pinned dated variant of gpt-image-2 |
| `gpt-image-1.5` | Intermediate release between 1 and 2 |
| `gpt-image-1-mini` | Smaller/cheaper gpt-image-1 variant, use for batch/draft generation where cost matters |
| `gpt-image-1` | Original gpt-image. Still works; superseded by gpt-image-2. |
| `chatgpt-image-latest` | Always-current alias of the model ChatGPT.com uses (currently gpt-image-2-class). Use when you want "whatever ChatGPT uses today" |
| `dall-e-3` | Legacy fallback. Different quality semantics (standard/hd, not low/medium/high). |

Pass any of these to `--model`. The script branches on `gpt-image*` for the quality/format handling, so all gpt-image-* variants work out of the box.

**Default in the script is now `gpt-image-2`** (the flagship), pass `--model gpt-image-1-mini` for cheap batch/draft work.

## Quick Usage

### Generate with OpenAI gpt-image-2 (flagship)

```bash
python ~/.agents/tools/generate-image.py \
  --prompt "a sunset over mountains, oil painting style" \
  --output ./sunset.png \
  --model gpt-image-2 \
  --quality high
```

### Generate with default (gpt-image-2)

```bash
python ~/.agents/tools/generate-image.py \
  --prompt "a sunset over mountains, oil painting style" \
  --output ./sunset.png
```

### High quality

The rest: https://github.com/OpenClaudia/openclaudia-skills/blob/HEAD/skills/ai-image-gen/SKILL.md
