SuperAPI AI Directory

gpt-image-studio

GPT Image Studio is a local workbench for OpenAI image models (such as gpt-image-2.5/2.6) that uses the user's own API Key to generate images. Users can request image generation with a single sentence through AI agents capable of executing commands, such as Claude Code and Codex, and the results appear in real time in a local web gallery, showing the cost per image and the remaining balance. It supports 1K/2K/4K resolutions, arbitrary aspect ratios, multiple reference images, and mask-based inpainting, and provides gallery tools such as favorites, filtering, search, and reuse of settings, as well as multiple agent integration methods including MCP, skill folders, and AGENTS.md. The project has zero dependencies and requires only Python 3.9+, and it can also be used directly on GitHub Pages in browser mode.

Open website

About this tool

GPT Image Studio is a local workbench built around OpenAI image generation models, with the core goal of enabling AI agents to generate images directly and view results, costs, and balance in real time in a local web gallery.

Purpose and positioning Users use their own OpenAI API Key to request image generation with a single sentence through Claude Code, Codex, or other AI agents capable of executing commands. The agent calls the official API, saves the file locally, and reports the cost of that image. Users can also generate images directly on the web page.

Main capabilities

  • Agent generation: Make requests such as "generate a 2K 16:9 image" to an AI agent, and the agent calls the API and saves the file.
  • Real-time web gallery: During generation, the page shows a "generating…" card with a timer, which is replaced by the result when complete.
  • Parameter support: GPT Image 2, GPT Image 2.5/2.6 sunburst/flare; 1K/2K/4K with arbitrary aspect ratios, up to 3840×2160; quality from low to xhigh/max; up to 16 reference images; mask-based inpainting supported.
  • Cost tracking: Calculates the cost of each image based on token usage, displays daily, monthly, and cumulative totals, and deducts subsequent spending from the most recently synced or entered balance.
  • Gallery tools: Favorites, filtering by status (completed/generating/failed), search, one-click reuse of settings, and "use as reference" to continue iterating; deleted items go to the .trash folder instead of being erased directly.
  • Multi-environment use: The same page can be hosted on GitHub Pages; on the computer running the local service it connects to the local service automatically, while other environments run in browser mode, with keys and images kept in the browser.
  • Balance sync: Say "sync my balance" to the AI to read the API balance of the selected organization; an optional browser extension is available for regular updates.
  • Multilingual: English, Chinese, Japanese, Korean, Russian, following the browser language and switchable on the page.
  • Relay service support: Compatible with OpenAI-compatible relays such as one-api and new-api, supporting image URL responses, per-image pricing, and reading the relay's real balance.
  • Zero dependencies: Requires only Python 3.9 or later, with no pip installation needed.

How to use

  1. As a Claude Code skill (recommended): Run start.bat (Windows) or sh start.sh (macOS/Linux), open in the browser http://127.0.0.1:8765;在 Settings → API, enter the OpenAI API Key and click "Test connection" (free); then request images from Claude Code. The key can also be provided via the OPENAI_API_KEY environment variable or config.json.
  2. Web only (no installation required): Open https://konglingbukong.github.io/gpt-image-studio/ And enter the key in Settings; the page runs in browser mode, and the browser communicates directly with OpenAI.
  3. Other agents (Codex, Cursor, Gemini, Antigravity, WorkBuddy, etc.): clients that support MCP can register scripts/mcp_server.py to enable generate_image, check_connection, get_spending, and sync_balance; agents that support the SKILL.md format can place the folder into the skills directory; agents that can run shell commands can follow AGENTS.md.

Local outfits and poses library Open Outfits & poses below the prompt box in the local workbench. On first open, the banner offers 1,407 outfits, 288 pose groups, and 1,439 angle images; after the banner is displayed for 20 seconds, it begins downloading the missing libraries from the upstream GitHub repository, totaling about 820 MB, and about 1.7 GB of free space is required during installation. You can choose Skip download to save the selection, or Stop download to stop. The default folder is ~/Pictures/gpt-image-libraries, which can be changed via GPT_IMAGE_LIBRARY_DIR, or set GPT_IMAGE_AUTO_DOWNLOAD=0 to skip automatic download. After selecting an outfit or pose and camera angle in the editor, click Add as reference; reference images are numbered in attachment order.

Relay service configuration In Settings → API → API URL, enter the relay address (usually ending in /v1), and enter the relay key in API Key; if the model name is different, enter that name in the model menu. If the relay rejects official-only parameters (moderation, output_format, background), enable Send basic parameters only. For per-image pricing, set it in Pricing → Per-image price. The corresponding fields in config.json are api_url, api_key, model, minimal_params, rates.per_image, and balance_source.

Security and limitations The local service listens only on 127.0.0.1 and validates Host and Origin, accepting requests only from local pages and sites listed in allowed_origins in config.json. The key is sent only to the configured API URL (OpenAI by default). Costs are calculated according to the rates in config.json (USD per 1M tokens), with defaults based on gpt-image-2.5 pricing at the time of writing: text input 5, image input 8, image output 30; after OpenAI adjusts prices, update them in Settings → Pricing. The displayed balance is an estimate; the OpenAI dashboard prevails. Downloaded images retain the upstream asset terms: the outfit source has separate terms for repackaged images, and the pose source is for non-commercial use only with attribution to @giaaibusi. The studio code uses the MIT license.

Use cases Suitable for users who want to quickly generate images through AI agents, need to track generation costs and balance, or want to manage generated results in a local gallery; also suitable for users of OpenAI-compatible relay services.