Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Generate and edit images with OpenAI's gpt-image-2 model. Use when the user asks to create, generate, render, edit, modify, inpaint, or composite images via OpenAI / GPT Image. Supports text-to-image generation, single- and multi-image edits, mask-based inpainting, reference-image composition, and transparent backgrounds via gpt-image-1.5.
.claude/skills/satasuk03-gpt-image-2/SKILL.md| Model | Eval pass | Runs |
|---|---|---|
| gemini-3.6-flash | 100% | 27 |
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-17 | ✗→✓ | ▲ Improved | 4% | 0% |
| case-01 | ✗→✓ | ▲ Improved | 19% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 48% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 11% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 31% | 0% |
Calls OpenAI's Image API with the gpt-image-2 model (default). Switch to gpt-image-1.5 with --model gpt-image-1.5 when you need transparent backgrounds. Two capabilities:
scripts/generate.py)scripts/edit.py)For full parameter reference and advanced patterns (Responses API multi-turn, streaming, custom resolutions), see references/api-reference.md and references/examples.md.
OPENAI_API_KEY exported in the environment.openai installed. If Pillow is needed for mask alpha-channel fixup, install pillow too.bash pip install openai pillow
bashpython scripts/generate.py \ --prompt "A children's book drawing of a vet listening to a baby otter's heartbeat" \ --output otter.png \ --size 1024x1024 \ --quality medium
--model gpt-image-1.5)bashpython scripts/generate.py \ --model gpt-image-1.5 \ --prompt "A shiny red apple on a transparent background" \ --output apple.png \ --background transparent
bashpython scripts/edit.py \ --image input.png \ --prompt "Add a small red balloon in the upper-left corner" \ --output edited.png
bashpython scripts/edit.py \ --image sunlit_lounge.png \ --mask mask.png \ --prompt "A pool containing a flamingo" \ --output lounge.png
bashpython scripts/edit.py \ --image lotion.png bath-bomb.png incense.png soap.png \ --prompt "A photorealistic gift basket on a white background labeled 'Relax & Unwind' containing all the items in the references" \ --output basket.png
When the user asks to make/edit an image, follow this order:
generate.py.edit.py (the model treats them as references).edit.py with --mask. The mask must:scripts/edit.py --fix-mask <path> first (auto-adds alpha) — see references/examples.md.| Flag | Values | Default | Notes | |------|--------|---------|-------| | --size | 1024x1024, 1536x1024, 1024x1536, 2048x2048, custom WxH, or auto | auto | Both edges multiples of 16; max edge 3840; ratio ≤ 3:1; total pixels in 655 360, 8 294 400] | | --quality | low, medium, high, auto | auto | Use low for drafts; medium/high for final | | --format | png, jpeg, webp | png | jpeg is fastest | | --compression | 0–100 | unset | Only with jpeg / webp | | --n | int ≥ 1 | 1 | Multiple images per call | | --moderation | auto, low | auto | low is less restrictive | | --model | gpt-image-2, gpt-image-1.5 | gpt-image-2 | gpt-image-1.5 supports transparent backgrounds | | --background | auto, opaque, transparent | auto | transparent only works with --model gpt-image-1.5 |
gpt-image-2gpt-image-1.5. gpt-image-2 does not support --background transparent; use --model gpt-image-1.5 --background transparent instead.input_fidelity param does not apply — every reference image is processed at high fidelity (and counted as more input tokens accordingly).high quality can take up to ~2 min. Use low while iterating, then re-run at high.1024x1024 ≈ $0.006, medium ≈ $0.053, high ≈ $0.211. Larger sizes cost more. See references/api-reference.md for the full table.--output; no manual base64 handling needed.The Image API (used by these scripts) is the right call for one-shot generate/edit. Switch to the Responses API instead when the user wants:
previous_response_id.references/examples.md has working snippets for both.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-17 | fail→pass | 12,176 | 4,265 | -65% | 1 | 1 | 0% | 2,044 | 2,132 | +4% | 0 | 0 | — |
case-01 | fail→pass | 9,162 | 3,364 | -63% | 1 | 1 | 0% | 1,743 | 2,072 | +19% | 0 | 0 | — |
case-02 | fail→pass | 10,829 | 5,308 | -51% | 1 | 1 | 0% | 1,712 | 2,530 | +48% | 0 | 0 | — |
case-03 | fail→pass | 11,832 | 3,117 | -74% | 1 | 1 | 0% | 1,848 | 2,057 | +11% | 0 | 0 | — |
case-04 | fail→pass | 9,190 | 4,235 | -54% | 1 | 1 | 0% | 1,604 | 2,100 | +31% | 0 | 0 | — |
case-05 | pass→fail | 9,994 | 6,224 | -38% | 1 | 1 | 0% | 1,525 | 2,479 | +63% | 0 | 0 | — |
case-06 | fail→pass | 11,734 | 2,615 | -78% | 1 | 1 | 0% | 2,104 | 1,951 | -7% | 0 | 0 | — |
case-07 | fail→pass | 11,136 | 3,331 | -70% | 1 | 1 | 0% | 1,999 | 2,079 | +4% | 0 | 0 | — |
case-08 | fail→pass | 8,909 | 2,250 | -75% | 1 | 1 | 0% | 1,310 | 1,760 | +34% | 0 | 0 | — |
case-09 | fail→pass | 9,772 | 3,601 | -63% | 1 | 1 | 0% | 1,748 | 2,152 | +23% | 0 | 0 | — |
case-10 | fail→pass | 15,764 | 5,405 | -66% | 1 | 1 | 0% | 2,596 | 2,471 | -5% | 0 | 0 | — |
case-11 | fail→pass | 13,421 | 3,470 | -74% | 1 | 1 | 0% | 2,168 | 2,074 | -4% | 0 | 0 | — |
case-12 | fail→pass | 6,584 | 2,278 | -65% | 1 | 1 | 0% | 1,153 | 1,754 | +52% | 0 | 0 | — |
case-13 | fail→pass | 10,890 | 1,680 | -85% | 1 | 1 | 0% | 1,483 | 1,689 | +14% | 0 | 0 | — |
case-14 | fail→pass | 6,189 | 2,034 | -67% | 1 | 1 | 0% | 1,135 | 1,800 | +59% | 0 | 0 | — |
case-15 | fail→pass | 6,773 | 2,430 | -64% | 1 | 1 | 0% | 1,277 | 1,893 | +48% | 0 | 0 | — |
case-16 | fail→pass | 8,163 | 1,861 | -77% | 1 | 1 | 0% | 1,537 | 1,824 | +19% | 0 | 0 | — |
case-18 | pass→pass | 13,943 | 3,018 | -78% | 1 | 1 | 0% | 2,481 | 2,017 | -19% | 0 | 0 | — |
case-19 | pass→pass | 11,433 | 6,017 | -47% | 1 | 1 | 0% | 1,762 | 2,569 | +46% | 0 | 0 | — |
case-20 | fail→pass | 9,624 | 4,828 | -50% | 1 | 1 | 0% | 1,745 | 2,235 | +28% | 0 | 0 | — |
case-21 | pass→pass | 8,178 | 1,875 | -77% | 1 | 1 | 0% | 1,424 | 1,773 | +25% | 0 | 0 | — |
case-22 | fail→pass | 12,672 | 4,483 | -65% | 1 | 1 | 0% | 2,131 | 2,287 | +7% | 0 | 0 | — |
case-23 | pass→pass | 10,113 | 4,832 | -52% | 1 | 1 | 0% | 1,812 | 2,195 | +21% | 0 | 0 | — |
case-24 | fail→pass | 12,023 | 4,549 | -62% | 1 | 1 | 0% | 2,267 | 2,318 | +2% | 0 | 0 | — |
case-25 | fail→pass | 12,236 | 5,812 | -53% | 1 | 1 | 0% | 2,438 | 2,565 | +5% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 25 cases were attempted. The headline lift of +76 percentage points is the difference between those two pass rates over the 25 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.