Introduction
Saphere supports the ability to compute certain measurements from a single image, such as facial BMI estimation. This section provides detailed guidelines and API options for processing image files.
Image Preparation Guidelines
To ensure accurate and consistent results, image files submitted for processing must follow these specifications:
- File format: PNG, JPG, JPEG, BMP, X-MS-BMP, WEBP, HEIC
- Maximum file size: 30 MB
- Color profile: Use natural (unfiltered) color images
- Image dimensions:
- Minimum:
224 xย 224
pixels - Maximum:
5000 x 5000
pixels
- Minimum:
- Environmental and Subject Conditions:
- One face per image
- Stand straight facing the camera (no profile views)
- Avoid facial obstructions
- Ensure uniform, frontal lighting (no strong shadows or backlighting)
- Stand straight facing the camera
- Camera positioned at the same height as the subject's face
- Step back 40-60 cm from the camera
- Hair tied back or tucked behind ears (or both)
- No glasses, No accessories (e.g., caps, hats)
- Chin and neck uncovered (no scarf or turtleneck)
- No heavy beard (maximum one-week growth)
- No retouching or image filters
- Mouth closed, no facial expression or grimace
- Use a plain background
- Leave some space around the face

How to Perform an Image Measurement Using the API
You can initiate a measurement from an image in two ways:
Single-Call Image Endpoint
Send both measurement parameters and the image file in one request:
POST /measures/images
Authorization: Bearer <your-api-key>
Content-Type: multipart/form-data
- image: <your_image.jpg>
- desiredVariables: ["faceBmi"]
This endpoint returns the computed results directly.
Two-Step API Method
This approach offers more flexibility and separation between initialization and media upload.
- Step 1: Create the measurement request
POST /measures
Authorization: Bearer <your-api-key>
Content-Type: application/json
{
"desiredVariables": ["faceBmi"]
}
โ Receive measureId
- Step 2: Upload the image to the measurement
POST /measures/{measureId}/image
Authorization: Bearer <your-api-key>
Content-Type: multipart/form-data
- image: <your_image.jpg>
After processing, the results will be available via the API or as part of a result event (depending on integration).
โ
For more information, see also:
- ๐ API reference guide
- ๐ Basic concepts