Your AI personal stylist. Upload a portrait and receive a luxury personal styling report (color season, hairstyle, outfit, accessory recommendations) generated by gpt-image-2.
Photo → gpt-image-2 (identity-preserving image edit) → Final styling report image
The portrait is sent directly to gpt-image-2 as the identity reference. The model derives the color analysis and produces the styling report in a single pass — no intermediate JSON.
- Backend: Python + FastAPI, OpenAI SDK
- Frontend: Vite + React + TypeScript
- Model:
gpt-image-2-2026-04-21
backend/ FastAPI app, prompts, OpenAI service
frontend/ Vite React UI
cd backend
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS/Linux
source .venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
# edit .env and set OPENAI_API_KEY
python run.pyThe API listens on http://localhost:8000.
cd frontend
npm install
npm run devThe UI runs on http://localhost:5173 and proxies /api/* to the backend.
| Method | Path | Purpose |
|---|---|---|
| GET | /api/health |
Health + configured model + report types |
| POST | /api/report |
Multipart portrait + report_type → { image_b64 } |
full_report, color_analysis, hairstyle_woman, hairstyle_man,
outfit_woman, outfit_man, accessories, before_after.
Prompts live in backend/app/prompts.py.
Backend .env variables (see backend/.env.example):
| Var | Default | Notes |
|---|---|---|
OPENAI_API_KEY |
— | Required |
OPENAI_IMAGE_MODEL |
gpt-image-2-2026-04-21 |
Image generation model |
CORS_ORIGINS |
http://localhost:5173,http://127.0.0.1:5173 |
Comma-separated |
MAX_UPLOAD_MB |
10 |
Upload size cap |
- Identity preservation is enforced inside every prompt template; the model receives the
uploaded image via
images.editso the face is kept as-is. - Generation cost and latency scale with
qualityandsize.high+1024x1536is the best-looking default; switch tomediumwhile iterating.