Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
luyuxuanleo avatar

Gpt Image 2

  • Updated June 14, 2026
  • leoleoasd/gpt-image-2-skill

gpt-image-2 is a Claude Code skill in the AI & Agent Building category. Generate and edit images with OpenAI's gpt-image-2 model.

Key points

  • gpt-image-2
  • AI & Agent Building
  • AI-coding skill

Gpt Image 2 by the numbers

  • Data as of Jul 7, 2026 (Skillselion catalog sync)
/plugin marketplace add leoleoasd/gpt-image-2-skill
/plugin install gpt-image-2@gpt-image-2-skill

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Last updatedJune 14, 2026
Repositoryleoleoasd/gpt-image-2-skill

What it does

Generate and edit images with OpenAI's gpt-image-2 model.

README.md

gpt-image-2-skill

A Claude Code skill that generates and edits images with OpenAI's gpt-image-2 model — text-to-image, image editing, inpainting, and multi-image composition — without leaving your terminal.

Packaged as a Claude Code plugin so it installs with two commands.

Install

In Claude Code:

/plugin marketplace add luyuxuanleo/gpt-image-2-skill
/plugin install gpt-image-2

Then give it your OpenAI API key. Easiest way — run the setup command and follow the prompt:

/gpt-image-2:setup

It saves the key to ~/.config/gpt-image-2/credentials (permissions 600) so you only do it once. Prefer to manage it yourself? Either of these also works:

export OPENAI_API_KEY=sk-...                 # per shell session
printf '%s' sk-... | python3 plugins/gpt-image-2/skills/gpt-image-2/gpt_image.py set-key -

The skill checks OPENAI_API_KEY first, then the saved file.

Use

Just ask Claude, e.g.:

  • "Generate a watercolor red fox sleeping in the snow, portrait orientation."
  • "Make a transparent PNG logo of a minimalist mountain icon."
  • "Edit photo.png to look like a vintage oil painting."
  • "Combine product.png and beach.png into one product shot on the beach."

Claude invokes the skill, saves the image next to your working directory, and gives you the path.

Run the script directly

The skill is a single zero-dependency Python script (urllib only — no pip install):

python3 plugins/gpt-image-2/skills/gpt-image-2/gpt_image.py \
  generate "a red fox in snow" --size 1024x1536 --quality high --out fox.png

python3 plugins/gpt-image-2/skills/gpt-image-2/gpt_image.py \
  edit "make the sky a starry night" --image scene.png --mask sky.png --out night.png

Options

Option Values
--size WxH or auto — edges multiple of 16, max 3840, ratio ≤ 3:1 (e.g. 1024x1024, 2048x2048, 3840x2160)
--quality low, medium, high, auto
--background transparent, opaque, auto
--format png, jpeg, webp
--compression 0-100 (jpeg/webp)
--n number of images
--out output path
--model override model id (or set GPT_IMAGE_MODEL)

Configuration

Env var Purpose
OPENAI_API_KEY required — your OpenAI API key
GPT_IMAGE_MODEL optional — override the model (default gpt-image-2)
OPENAI_BASE_URL optional — point at a compatible/proxy endpoint

License

MIT

Related skills

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.