A local studio that wrangles GPT, Grok, and Gemini images
It exists because cloud image generators deserve a local memory layer, a branching canvas, and a UI outside the chat thread.

What it does
ima2-gen runs as a local web studio and CLI for generating images and short videos through OpenAI, xAI Grok, and Google Gemini backends. It wraps the official APIs — and, crucially, offers OAuth login via ChatGPT or Grok accounts so you can generate without an API key. Every asset lands in a local gallery with session history, node branching, and a canvas for mask-guided cleanup.
The interesting bit
The project treats the browser as a desktop-like shell rather than a thin API wrapper. It multiplexes all generation progress through a single Server-Sent Events stream to dodge the browser’s six-connection limit, and it can branch generations into a node graph so you never overwrite a promising draft. That architectural care suggests the author actually uses this for iterative work instead of one-off prompts.
Key highlights
- Dual auth paths: Log in with ChatGPT or Grok OAuth for free-tier generation, or plug in API keys for OpenAI, xAI, or Gemini direct billing.
- Multi-provider routing: Supports OpenAI (
oauth/api), Grok (grok/grok-api), and Gemini (agy/gemini-api), each with distinct model, size, and quality controls. - Branching workflows: Classic single or multimode generation, Node mode for non-destructive branching, Canvas Mode for annotation and background cleanup, and Storyboard mode for frame continuity.
- Video via Grok: Generates 1–15 second clips from text, single images, or multiple references, with SSE-streamed progress and keyframe extraction.
- Local persistence: Keeps assets, metadata (generation time, reasoning effort), and request IDs on disk, so history survives reloads.
Caveats
- Provider parity is uneven: the Gemini
agypath is locked to 1024×1024 JPEG with no quality or size controls, and Vertex AI ignores aspect-ratio settings entirely. - Video generation requires Grok OAuth or a Grok API key; the ChatGPT OAuth path is images-only.
- The README warns that
gpt-5.5support depends on your local Codex CLI version and may consume more quota or behave unpredictably.
Verdict
Worth a look if you generate images daily and want a local, browsable archive with branching history. Skip it if you just need a single curl command or already have a rigid API pipeline.
Frequently asked
- What is lidge-jun/ima2-gen?
- It exists because cloud image generators deserve a local memory layer, a branching canvas, and a UI outside the chat thread.
- Is ima2-gen open source?
- Yes — lidge-jun/ima2-gen is open source, released under the MIT license.
- What language is ima2-gen written in?
- lidge-jun/ima2-gen is primarily written in TypeScript.
- How popular is ima2-gen?
- lidge-jun/ima2-gen has 505 stars on GitHub.
- Where can I find ima2-gen?
- lidge-jun/ima2-gen is on GitHub at https://github.com/lidge-jun/ima2-gen.