← Sam Mozer
Reni AI
An iOS app that renovates a photo of your room, then lets you buy the furniture and paint in the result. I co-founded it and built the AI backend.
- Role
- Co-founder · AI backend
- Traction
- 4,000+ users · $8,000+ revenue
- Stack
- SwiftUI · Supabase · Gemini · OpenAI · Workers AI
How a request flows
photo + "make it mid-century, swap the couch for green velvet"
│
▼
intent classifier Gemini Flash-Lite → JSON, one of 15 edit types
│ falls back to Llama 3.3 70B on Workers AI via AI Gateway
▼
spatial analysis Gemini Vision maps the room before move / rotate edits
│
▼
model router
├─ structural changes → GPT Image 1.5
├─ rotate / move items → Gemini 3 Pro Image
└─ everything else → Gemini 3.1 Flash Image (2.5 Flash Image as backup)
│
▼
render ──► shoppable items ──► paint matches
Every request is a Supabase Edge Function call from the iOS app. The backend is a set of small functions (intent detection, generation, product matching, visual search, paint matching) rather than one big service, so each step can change its model or prompt on its own.
What I built
- The image-generation pipeline, through 8 versions. Each edit type got its own prompt enhancers and its own best model. By v8 I'd simplified routing to three image models and turned off a two-pass transform and a validation retry loop, because the newer models handled spatial edits directly and the extra passes cost too much time.
- An LLM intent classifier. It replaced the original regex matching with semantic classification into 15 intents, returned as structured JSON so the router can trust it.
- A fallback path on Cloudflare. When Gemini rate-limits or errors, intent detection retries on Llama 3.3 70B through Workers AI, routed and labeled through AI Gateway so I can see fallback traffic separately.
- Shoppable renders. When someone taps an item, Gemini draws a bounding box around what it generated, the crop goes to Google Lens for a real visual search, and matching products come back. A second path builds search queries for Amazon's product API and Google Shopping.
- Paint matching. Colors in the render are matched to real Benjamin Moore, Sherwin-Williams, and Behr paints using perceptual CIELAB distance, with post-processing so named colors come out pixel-accurate.
How I worked on it
No single image model was best at everything, so I tested intent by intent: sample prompts for each edit type, then picked the model, decided whether spatial analysis helped, and tuned that intent's prompt enhancers. Routing logs (which intent fired, whether spatial ran, which model handled it) made it easy to see when a request went down the wrong path.