A web-based AI home-design tool inspired by CozyAI. Upload a photo of a room, pick a style, add optional details, and get a photorealistic AI redesign with a before/after comparison — powered by OpenAI GPT Image 2.
The studio in action: an open-plan co-working space redesigned into a bright Scandinavian living room — light woods, white walls, wishbone chairs, a linen sofa, and soft natural light. The draggable before/after slider reveals the original office on the left and the AI redesign on the right, while the room's structure (column, exposed ceiling, wall art, and window light) is preserved.
The same room reimagined in an Industrial style at High quality — exposed brick, a raw concrete column, black metal pendant lamps with Edison bulbs, reclaimed-wood tables, and tan leather seating. The left control panel shows the full workflow: room type, style swatches, quality tier, and an optional free-text prompt.
- Photo upload (drag & drop) — PNG / JPEG / WebP, up to 10MB
- Room type + style pickers (Scandinavian, Modern, Industrial, Japandi, and more)
- Natural-language details to steer the redesign
- GPT Image 2 redesign via the Images edit endpoint (preserves room architecture)
- Before/after slider and one-click download
- Local project history (IndexedDB — no account needed)
- Install deps:
npm install
- Add your OpenAI key:
cp .env.example .env.local # edit .env.local and set OPENAI_API_KEYYour OpenAI org must have access to
gpt-image-2and, for image generation, may need API org verification. - Run the dev server:
Open http://localhost:3000.
npm run dev
src/app/page.tsx— the studio UI (upload, style, generate, history).src/app/api/generate/route.ts— server route; validates input, keeps the API key server-side, calls the provider.src/lib/providers/—ImageProviderinterface +gpt-image-2implementation. Swap or add a model (e.g. Gemini) here without touching the rest of the app.src/lib/prompt.ts— builds the redesign prompt from room type + style + description.src/lib/constants.ts— room types and design styles (data-driven).src/lib/history.ts— IndexedDB-backed local project history.
- Brush-to-Edit (mask endpoint is already wired in the provider interface)
- Reference-image / moodboard guidance (provider supports multiple inputs)
- Declutter / Enhance presets, Outdoor mode
- Accounts, cloud storage, and credits/billing

