← all repositories
CookSleep/gpt_image_playground

A polished frontend for OpenAI's image API that keeps your data local

A React-based web UI for OpenAI's gpt-image-2 API with local-only storage, multi-provider support, and an unusually thoughtful approach to prompt fidelity.

2.2k stars TypeScript Image · Video · Audio
gpt_image_playground
Velocity · 7d
+49
★ / day
Trend
steady
star history

What it does

GPT Image Playground is a browser-based image generation and editing interface built around OpenAI’s gpt-image-2 API. It wraps both the Images API and Responses API in a React + Tailwind UI, supports reference images with mask editing, and stores everything—history, images, settings—in the browser’s IndexedDB via SHA-256 deduplication. No server-side persistence.

The interesting bit

The project treats prompt fidelity as a first-class concern. It injects anti-rewrite instructions into Responses API calls and offers a Codex CLI compatibility mode that splits batch generation into concurrent single-image requests. There’s also a built-in diagnostic that nudges you toward compatibility modes when it detects provider-specific quirks. That’s unusual attention to edge cases for what could have been a thin API wrapper.

Key highlights

  • Supports OpenAI, OpenAI-compatible endpoints, fal.ai, and custom HTTP providers via JSON import
  • Agent mode with multi-turn conversation, branching, and @ references to prior images
  • Streamed intermediate image previews to mitigate timeout issues on long generations
  • Visual mask editor with automatic resolution preprocessing (up to 16 reference images)
  • Desktop: drag-to-box-select, Ctrl/⌘ multi-select; Mobile: swipe-to-select gesture
  • One-click ZIP export of all local data; Docker/Vercel/Cloudflare Workers deployment options
  • Optional built-in Nginx proxy to bypass CORS, with lockable settings for shared deployments

Caveats

  • The README warns that Vercel’s .dev domain enforces HTTPS, so local HTTP APIs require GitHub Pages or self-hosting
  • Docker proxy mode opens your server as a general API relay; the docs explicitly flag this as a security concern needing access controls

Verdict

Worth a look if you want a self-hostable, privacy-respecting alternative to OpenAI’s official playground with more provider flexibility and batch workflow features. Probably overkill if you just need occasional one-off image generation.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.