The staging studio (Dashboard > Staging studio) turns a photo of an empty room into a furnished version, to help buyers picture the space. It is off until you connect an image service, and it never shows sample or made-up results.
Switching it on
Add to .env and restart:
AI_IMAGE_URL="https://api.openai.com/v1/images/edits"
AI_IMAGE_KEY="sk-..." # empty = use AI_API_KEY
AI_IMAGE_MODEL="gpt-image-1"
AI_IMAGE_SIZE="1536x1024"
Any endpoint that follows the OpenAI images format works: OpenAI, Azure OpenAI, or a self-hosted server with the same interface.
- An edits endpoint (URL ending in
/images/edits) receives the photo as multipartimagewith the prompt, so the walls, windows and floor are kept. Use this one. - A generations endpoint only receives the prompt and cannot see your photo; the studio warns about this.
The answer may contain b64_json or an https url; both are saved to UPLOAD_DIR.
Using it
- Upload a straight, well-lit photo of the empty room.
- Choose the room (living room, bedroom, majlis, dining room, kitchen, home office) and a style (contemporary Omani, modern minimal, warm majlis, coastal, Scandinavian, classic luxury).
- Optionally choose a listing: the result is added to its photos with
virtual: true. - "Stage this room". The request can take up to a minute.
The prompt (in stagingPrompt(), src/lib/ai.ts) asks the model to keep the room's architecture, camera angle and light, and to add only furniture and decor.
Honesty
Staged photos always show a "Virtually staged" label on the website gallery. Many markets require virtually staged photos to be disclosed; keep the label.
Limits and costs
Each staff member can stage 6 photos per minute. Every call is billed by your provider. In demo mode the studio is refused like any other change.
API
POST /api/dashboard/ai/staging with {"imageUrl", "style", "room", "propertyId"?} answers 201 {"images": [url], "addedTo"}, or 503 ai_not_configured, or 502 ai_failed with the provider's error.