gpt-image-2-api

gpt-image-2-api is a skill for Claude Code from BenedictKing/benedictking-skills. It costs 69 tokens per session (1,937 once invoked), scanned A, original, MIT.

An image-generation and image-editing skill that connects to an OpenAI-compatible API endpoint configured through environment variables or a .env file.

In plain words
What is it for?
Use it to create images, edit reference images, and produce visual assets, illustrations, or image variations when the required API settings are available.
Why use it?
It lets image work use a configurable API address and model settings instead of relying on fixed connection details. Image size, quality, protocol, and output count can be configured.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions Claude Code.

Part of the benedictking-skills plugin — 6 skills shipped together

Good fit Use it to create images, edit reference images, and produce visual assets, illustrations, or image variations when the required API settings are available.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/benedictking/benedictking-skills/gpt-image-2-api
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add BenedictKing/benedictking-skills --skill gpt-image-2-api
Clone the repo
git clone --depth 1 https://github.com/BenedictKing/benedictking-skills

Made for: Claude Code.

Or install benedictking-skills, the plugin that ships this one along with the rest of its 6 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for gpt-image-2-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/benedictking/benedictking-skills/gpt-image-2-api/github.svg)](https://agentmods.dev/skills/benedictking/benedictking-skills/gpt-image-2-api)
Your own site
<a href="https://agentmods.dev/skills/benedictking/benedictking-skills/gpt-image-2-api"><img src="https://agentmods.dev/badge/skills/benedictking/benedictking-skills/gpt-image-2-api/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for gpt-image-2-api

Your own site · 80×15
<a href="https://agentmods.dev/skills/benedictking/benedictking-skills/gpt-image-2-api"><img src="https://agentmods.dev/badge/skills/benedictking/benedictking-skills/gpt-image-2-api.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,937 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00069 $0.01937
Opus 5 $0.00034 $0.00968
Sonnet 5 $0.00014 $0.00387
Haiku 4.5 $0.00007 $0.00194

Measured 10d ago against content hash c5f7bef2a2d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

gpt-image-2-api scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/gpt-image-2-api.mjs), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/gpt-image-2-api/SKILL.md · 135 lines

How it starts

The opening of the file, as written. The whole thing — 135 lines — stays where its author put it; the contents beside it link to each section on GitHub.

gpt-image-2-api

Purpose

Generate and edit images with gpt-image-2 through a third-party OpenAI-compatible API using .env-configured OPENAI_API_KEY and OPENAI_BASE_URL values. Use when the user asks to create images, edit reference images, create visual assets, illustrations, or image variations with a configurable API endpoint.

Environment Variables & API Key

Two ways to configure API settings (priority: environment variable > .env):

  1. Environment variables: OPENAI_API_KEY, OPENAI_BASE_URL, and optional OPENAI_IMAGE_* overrides
  2. .env file: Place in .env, can copy from .env.example

You can manage the .env file manually or through skill-master env set.

Configuration

  • OPENAI_API_KEY: API key for the third-party endpoint
  • OPENAI_BASE_URL: OpenAI-compatible base URL, for example http://127.0.0.1:3688/v1
  • OPENAI_IMAGE_MODEL: image model name, defaults to gpt-image-2
  • OPENAI_IMAGE_PROTOCOL: openai_images or openai_chat, defaults to openai_images
  • OPENAI_IMAGE_SIZE: image size, defaults to 1024x1024
  • OPENAI_IMAGE_QUALITY: optional image quality
  • OPENAI_IMAGE_N: number of images (1-10), defaults to 1
  • OPENAI_IMAGE_OUTPUT_FORMAT: optional output format (png, jpeg, webp)
  • OPENAI_IMAGE_FORMAT: legacy alias for OPENAI_IMAGE_OUTPUT_FORMAT
  • OPENAI_IMAGE_RESPONSE_FORMAT: optional response format (url, b64_json)
  • OPENAI_IMAGE_BACKGROUND: optional background (transparent, opaque, auto)
  • OPENAI_IMAGE_MODERATION: optional moderation level (low, auto)
  • OPENAI_IMAGE_OUTPUT_COMPRESSION: optional compression level 0100 for jpeg / webp
  • OPENAI_IMAGE_PARTIAL_IMAGES: optional streaming partial image count 03
  • OPENAI_IMAGE_INPUT_FIDELITY: optional edit fidelity (high, low)
  • OPENAI_IMAGE_STYLE: optional generation style for dall-e-3 (vivid, natural)
  • OPENAI_IMAGE_STREAM: optional openai_images SSE toggle (true, false)
  • OPENAI_IMAGE_USER: optional end-user identifier
  • OPENAI_IMAGE_EXTRA_JSON: optional JSON object merged into the request body

Read the full file on GitHub · 135 lines

Files

What ships with it

2 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 135 lines · 69 tokens per session scan A c5f7bef2a2d9

Subscribe to this mod's changes

gpt-image-2-api is a skill published in the GitHub repository BenedictKing/benedictking-skills (14 stars, last pushed 1mo ago), licensed MIT. It adds 69 tokens to every session and 1,937 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

rework-rate

Measure and interpret PR rework rate — the emerging 5th DORA metric.

bradygaster/squad · 20 tokens

elevenlabs

Generate AI voiceovers, sound effects, and music using ElevenLabs APIs. Use when creating audio content for videos, podcasts, or games. Triggers include generating voiceovers, narration, dialogue, sound effects from descriptions, background music, soundtrack generation, voice cloning, or any audio synthesis task.

digitalsamba/claude-code-video-toolkit · 63 tokens

ffmpeg

Video and audio processing with FFmpeg. Use for format conversion, resizing, compression, audio extraction, and preparing assets for Remotion. Triggers include converting GIF to MP4, resizing video, extracting audio, compressing files, or any media transformation task.

digitalsamba/claude-code-video-toolkit · 55 tokens

playwright-recording

Record browser interactions as video using Playwright. Use for capturing demo videos, app walkthroughs, and UI flows for Remotion videos. Triggers include recording a demo, capturing browser video, screen recording a website, or creating walkthrough footage.

digitalsamba/claude-code-video-toolkit · 53 tokens

ideogram4

Prompting patterns for Ideogram 4 text-to-image — best-in-class in-image text rendering and exact color/layout control via structured JSON captions. Use when generating images that need legible on-image text (title cards, thumbnails, logos, signage, CTAs), precise brand colors, or controlled spatial layout. Triggers…

digitalsamba/claude-code-video-toolkit · 99 tokens

memstack-content-youtube-script

Use this skill when the user says 'YouTube script', 'video script', 'write script for YouTube', 'YouTube video outline', or is creating scripted content for a YouTube video with hooks, chapters, and CTAs. Do NOT use for TikTok/Reels short-form scripts or webinar presentations.

cwinvestments/memstack · 70 tokens