Skin Analysis
The AI skin analysis flow: state, photo slots A1–C3, analysis, infographic, retake.
Run the skin analysis
Runs the analysis on the uploaded photos and the saved survey, and completes the attempt. The attempt must be in progress and have at least one photo. The reply carries the analysis text.
Create the skin infographic
Turns a completed analysis into a self-contained HTML infographic. It is kept, so later calls return it without writing it again.
Remove a skin photo
Removes the photo in one slot of the attempt in progress. Answers normally when the slot is already empty.
Add a skin photo
Adds one photo, base64-encoded, to a slot of the attempt in progress. A slot that already has a photo is overwritten.
Start the skin analysis again
Starts over: discards the attempt in progress so the next save begins a new one. Completed attempts are kept. Safe to repeat.
Get skin analysis state
Returns the in-progress attempt if any (so the runner can resume), else the latest completed attempt, else null. The FE distinguishes by `status`: 'in-progress' resumes the runner; 'completed' jumps to the results view.
Save skin analysis progress
Saves progress on the attempt in progress, creating it on the first call. `survey` is merged into the saved answers, so a save can be sent on every change. A completed attempt cannot be changed: start again with `POST /skin-analysis/retake`.