Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here
gpt-image-2 logo

gpt-image-2

gpt-image-2-skill

OtherClaude Codeby leoleoasd

Summary

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

Install to Claude Code

/plugin install gpt-image-2@gpt-image-2-skill

Run in Claude Code. Add the marketplace first with /plugin marketplace add leoleoasd/gpt-image-2-skill if you haven't already.

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 plugins

Browse all →