About this endpoint
What it does
Uploads a product photo and returns the clockwise rotation needed to make it upright, with a confidence score for each answer. The response gives the quarter-turn fix in rotationClockwise4Axis and the precise fix including fine tilt in rotationClockwiseFull. It also flags photos that should be reviewed by a person and photos whose EXIF orientation tag disagrees with the image content.
Use it to check uploads before they reach shoppers or downstream image processing. Rotation values are always clockwise and are based on the image pixels, not the EXIF tag. Rotating by rotationClockwise4Axis is lossless; correcting fine tilt with rotationClockwiseFull requires resampling.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| file | String | Yes | The product photo to analyze. Supported formats: JPEG, PNG, WebP, GIF, TIFF, AVIF and HEIC (iPhone). The format is detected from the file content, not the file name. No minimum or maximum resolution. Keep the product roughly centered, as the service analyzes a centered crop. |
Response
Returns a JSON object with the rotation needed, a confidence score for each answer, and a resolved flag that tells you whether the result is safe to apply automatically. exifOnlyRemainder and note are null when there's nothing to report. When resolved is false, note explains why.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| ok | Boolean | Yes | true when the image was analyzed successfully. |
| wasAlreadyUpright | Boolean | Yes | true when the photo is already upright and needs no rotation. |
| rotationClockwise4Axis | ENUM | Yes | Clockwise rotation needed, as a quarter turn. Allowed values: 0, 90, 180, 270. |
| confidence4Axis | Number | Yes | Confidence in rotationClockwise4Axis, from 0 to 1. |
| rotationClockwiseFull | Number | Yes | Complete clockwise rotation needed in degrees, including fine tilt, from 0 to 360. |
| confidenceFull | Number | Yes | Confidence in rotationClockwiseFull, from 0 to 1. Always lower than or equal to confidence4Axis, because fine tilt is harder to measure. |
| exifOnlyRemainder | Number | No | Signed degrees still needed if you rotate by the EXIF orientation tag alone. Positive is clockwise, negative is counter-clockwise. null when the photo has no EXIF tag that implies a rotation. |
| resolved | Boolean | Yes | false means the result should not be applied automatically and the photo should be reviewed by a person. |
| note | String | No | A short, plain-language message explaining why the result needs attention, or null when there's nothing to flag. It is returned when confidence is too low to apply the result automatically, or when the photo's EXIF orientation tag disagrees with the image content (the rotation values always follow the image content). In both cases resolved is false. Use resolved for logic; the message text is for display and may change. |
| heicConverted | Boolean | No | true when the input was a HEIC (iPhone) photo that was decoded before analysis. |
| latencyMs | Integer | No | Processing time in milliseconds. |
Errors
Errors return HTTP 400 with ok: false and a code field.
| Code | When it happens |
|---|---|
| multipart_no_file_part | No file was sent in the request. |
| empty_body | The uploaded file is empty (0 bytes). |
| unsupported_image_format | The file is not a supported image format. |
| inference_failed | The image could not be read, for example a corrupt or truncated file. |



