API for SVG Masks
How to receive Algorithm Masks visualized as SVG images.
the Masks are additional results of image analysis, representing the spatial information about detected skin/hair health returned by the selected set of Algorithms.
falseSuccessful Response
Validation Error
Possible Results
Normal full result (masked image + metrics + submetrics)
Normal result without submetrics
Normal result but without mask
Possible Errors
If you accidentally request an algorithm without masks:
If you request an algorithm that wasn't calculated for the image:
Example SVG Mask
How to embed SVG mask or image to HTML
Without JavaScript
Using object tag, just insert the generated signed URL into data attribute.
✅ Pros: Retains SVG scalability and interactions.
❌ Cons: Limited browser support and no direct CSS styling.
With JavaScript
Download SVG content from the signed URL and inject it into your div container.
✅ Pros: Allows direct manipulation via CSS and JS.
❌ Cons: Requires JavaScript to fetch and insert the SVG.
CSS mask customization example
For example I have the svg mask for eye bags algorithm.
The mask consists of 3 masks actually:
eye_bags-dark_circles_mask(yellow)eye_bags-eye_bags_mask(green)eye_bags-lacrimal_grooves_mask(white)
And it will look like this:

For example, I would like to override the fill color of eye_bags-eye_bags_mask.
In order to achieve it, I need to add this CSS rule:
So the result would look like this:

Last updated
Was this helpful?