dalle-apilisted
Install: claude install-skill trku052-png/social-media-youtube-skills
# DALL-E API (gpt-image models)
## Overview
**DALL-E 2 and DALL-E 3 were shut down on 2026-05-12.** OpenAI's deprecations page lists both as removed from the API and recommends `gpt-image-2`, `gpt-image-1` or `gpt-image-1-mini` instead. Code that passes `model="dall-e-3"` or `"dall-e-2"` no longer works, and variations (a DALL-E 2 feature) have no gpt-image equivalent. The endpoints are the same: `images.generate` (`/v1/images/generations`) and `images.edit` (`/v1/images/edits`).
Key differences from DALL-E: gpt-image models always return base64 (`data[0].b64_json`), never URLs; they do not return `revised_prompt`; `style`, `response_format` are not supported; edits take multiple input images and a prompt-guided mask. OpenAI's reference also lists newer `gpt-image-1.5` and `gpt-image-2.5-sunburst` / `gpt-image-2.5-flare` models; check the model list in the reference before pinning one. This skill uses `gpt-image-2`.
## Instructions
### Step 1: Client
```bash
pip install openai
export OPENAI_API_KEY="..." # set in your shell or secret manager
```
```python
import base64
from pathlib import Path
from openai import OpenAI
client = OpenAI() # reads OPENAI_API_KEY
MODEL = "gpt-image-2"
def save(response, path: str, index: int = 0) -> str:
Path(path).write_bytes(base64.b64decode(response.data[index].b64_json))
return path
```
### Step 2: Generate
```python
res = client.images.generate(
model=MODEL,
prompt="A ceramic mug with steam rising on a marble ki