How We Built an AI-Powered African Interior Design Tool

When we started building African Interior Design, we had one simple conviction: African homes deserve better than generic filters. But turning that conviction into a working product raised technical questions that no one had ready-made answers for. How do you prompt an image model to generate a living room in Yoruba, Moroccan Berber, or Afro-Futurist style? How do you guarantee service availability when third-party APIs go down? How do you fairly queue requests across free and paid users?

This is an honest account of the choices we made, what worked, and what we'd do differently.


The Core Problem: African Styles Are Under-Represented

Major image generation models — Stable Diffusion, Flux, Midjourney — were trained predominantly on Western data. Ask them for "a living room in African style" and you'll typically get ethnic decorative items scattered across an IKEA backdrop. Not what we were after.

Our approach: don't fight the model — guide it precisely through the prompt. Every style in our catalog (110+ and growing) has a hand-crafted prompt field written in English, specifically designed to anchor the model in the target aesthetic.

Here's a real prompt for the Zulu Royal style:

Zulu royal interior, cowhide rugs in circular patterns, isicholo-inspired ceiling forms,
beadwork in cobalt blue and crimson, assegai motifs on feature walls, warm ochre plaster
surfaces, carved stools as accent furniture, indirect warm ambient lighting

Notice the specificity: materials (cowhide rugs, warm ochre plaster), architectural forms (isicholo-inspired ceiling), cultural motifs (beadwork in cobalt blue), and light direction. That precision is what separates a generic result from one that honors a culture.

Each style also carries structured metadata — materials, colors, patterns — stored in Supabase and dynamically combined with the prompt based on the selected generation mode.


Model Selection: Why Gemini

We tested several models before landing on Google Gemini gemini-3.1-flash-image-preview as our primary. The reasons:

  1. Native semantic understanding — Gemini is multimodal. It processes the full context of a prompt, not just keywords. Complex cultural descriptions land better.
  2. Spatial coherence — In our internal tests, Gemini produced more balanced interior compositions than Flux Schnell or SDXL alone.
  3. Reasonable latency — For an interactive use case, speed matters. Flash-preview is significantly faster than full Imagen models.

For chat and auto-analysis, we use gemini-2.5-flash-lite — capable enough to return 4 relevant style suggestions from a photo, and much cheaper per call.


The Fallback Chain: Never Fail a Generation

Image generation APIs have downtime. It's a fact. Our internal SLA is to ensure a generation succeeds even if the primary model is unavailable.

We implemented an automatic fallback chain via Replicate:

Gemini flash-image-preview
  └─ fail → Replicate Seedream-5-lite
             └─ fail → Flux Schnell
                         └─ fail → Seedream-4.5

For inpainting, the same logic:

SD Inpainting → SDXL Inpainting → Flux Fill Pro

Key Lessons

  • Prompt engineering is cultural knowledge work, not just engineering
  • A fallback chain is not optional when you're using unstable third-party APIs
  • Async polling (for 3D Worlds) requires careful UX design to prevent user abandonment
  • Priority queuing is a product decision as much as a technical one

If you're building AI tools for underrepresented cultures, we'd love to compare notes.