Skip to content

kitephp/gpt-image-2-studio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GPT Image 2 Studio

简体中文

GPT Image 2 Studio is a local-first, single-file web workspace for generating images with gpt-image-2. It runs directly from index.html with no backend, build step, package manager, or server dependency.

The app is designed for personal use, demos, and OpenAI-compatible image API workflows where you want a portable browser UI with local history.

Features

  • Text-to-image generation through POST /images/generations.
  • Reference-image generation through POST /images/edits with up to 16 uploaded images.
  • Default model set to gpt-image-2, with manual model entry as a fallback.
  • Custom API Base URL, defaulting to https://api.openai.com/v1.
  • Model list fetching through GET /models, with image-model filtering and a show-all toggle.
  • Local IndexedDB history with previews, prompt restore, download, import, and export.
  • API key session storage by default, with an optional "remember key on this machine" setting.
  • Bilingual UI, English and Simplified Chinese.
  • Light and dark modes.
  • Size presets including auto, 1024, 1536, 2K, 4K, and custom sizes.
  • Output controls for quality, format, background, and image count.

Usage

Open index.html directly in a modern browser, or use the GitHub Pages deployment after it is enabled.

  1. Enter an API key.
  2. Keep the default API Base URL or provide an OpenAI-compatible proxy URL.
  3. Enter a prompt.
  4. Choose the model, size, quality, format, background, and number of images.
  5. Optionally upload reference images.
  6. Click Generate.

No installation is required.

Privacy and Security

This is a browser-only client. It does not include a backend, proxy, account system, telemetry, or hosted key storage.

  • API requests are sent from your browser to the configured API Base URL.
  • The API key is stored in browser session storage by default.
  • If "remember key on this machine" is enabled, the key is stored locally in IndexedDB.
  • Generation history is stored locally in IndexedDB.
  • Exported history JSON may contain generated image data and prompts.

Because requests are made directly from the browser, the official OpenAI API or other providers may block requests with CORS restrictions. If that happens, use an API Base URL that is explicitly designed for browser access.

Notes

  • gpt-image-2 currently blocks transparent background generation in the UI.
  • Custom size validation follows the app's client-side limits: max edge 3840, dimensions as multiples of 16, aspect ratio up to 3:1, and total pixels between 655,360 and 8,294,400.
  • This project is not affiliated with, endorsed by, or sponsored by OpenAI.

Contributing

Issues and pull requests are welcome. For small changes, please keep the app dependency-free and preserve the single-file static workflow.

License

Released under the MIT License.

About

GPT Image 2 Studio 是一个本地优先的 gpt-image-2 单页图像生成工作台。它可以直接打开 index.html 使用,不需要后端、构建步骤、包管理器或本地服务。

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages