---
title: Detect Image Rotation API
slug: detect-image-rotation-api
url: https://apyhub.com/blueveta/service/detect-image-rotation-api
provider: BlueVeta
tags: [rotation detection, product photos, computer vision, ecommerce, image processing]
auth: apikey
version: v1
service_type: sync
endpoints: 1
atoms: 1
mcp: true
---

# Detect Image Rotation API

Detect incorrect image orientation and get the recommended rotation angle to make images upright using an image rotation detection API.

## Endpoints

| Method | URL | Description | Atoms |
| --- | --- | --- | --- |
| POST | `https://api.eu.apyhub.com/blueveta/detect-image-rotation-api/api/upright` | What it does Uploads a product photo and returns the clockwise rotation needed to make it upright,… | 1 |

## Endpoint reference

### Detect photo rotation

`POST https://api.eu.apyhub.com/blueveta/detect-image-rotation-api/api/upright` · 1 atoms · accepts `multipart/form-data` · returns `application/json`

| Parameter | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `file` | body | string (binary) | yes | The product photo to analyze. JPEG, PNG, WebP or HEIC. Keep the product roughly centered. |

#### Quickstart

Upload a product photo to check whether it's upright and how far to rotate it.

```bash
curl -X POST "https://api.eu.apyhub.com/blueveta/detect-image-rotation-api/api/upright" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/photo.jpg"
```

#### What you'll get back

Returns a JSON object with the clockwise rotation needed and a confidence score for each answer. `rotationClockwise4Axis` is the quarter-turn fix (`0`, `90`, `180` or `270`), `rotationClockwiseFull` adds any fine tilt, and `resolved` is `false` when the photo should be reviewed by a person. `note` is `null` unless there's something to flag, such as a low-confidence or EXIF-mismatch warning.

```json
{
  "ok": true,
  "wasAlreadyUpright": false,
  "rotationClockwise4Axis": 90,
  "confidence4Axis": 0.94,
  "rotationClockwiseFull": 93,
  "confidenceFull": 0.86,
  "exifOnlyRemainder": null,
  "resolved": true,
  "note": null,
  "heicConverted": false,
  "latencyMs": 480
}
```

## About

## What it does
Detect Image Rotation API checks whether a product photo is upright and tells you exactly how far to rotate it if it isn't. Upload an image in the `file` field and get back a JSON response with `wasAlreadyUpright`, the clockwise quarter-turn fix in `rotationClockwise4Axis` (`0`, `90`, `180` or `270`), the precise fix including fine tilt in `rotationClockwiseFull`, and a confidence score from 0 to 1 for each. The service supports JPEG, PNG, WebP, GIF, TIFF, AVIF and HEIC (iPhone) photos, with no minimum or maximum resolution.

Use it when uploaded product photos need an orientation check before they are shown to shoppers, added to a catalog, or passed into AI vision, background removal, or OCR steps that perform worse on rotated input. It works best on packaged goods with visible text or labels and on products with a clear shape, such as bottles and boxes. Keep the product roughly centered, because the service analyzes a centered crop of the image.

Results are based on the image pixels, not the EXIF orientation tag. When the result isn't reliable enough to apply automatically, `resolved` is `false` and `note` carries a short message saying why, so you can send the photo to a person instead. When the camera tag disagrees with the image content, `resolved` is also `false`, `note` says so, and `exifOnlyRemainder` shows how many degrees would still be off if you rotated by the tag alone. Hand-held products, symmetric objects, and flat-lay shots are harder to call and are more likely to come back unresolved.

If you are building a marketplace upload flow, catalog ingestion job, or image moderation queue, Product Photo Rotation Detector gives you a clear rotate, skip, or review decision for every photo without training your own model.

## Usage

Base URL: `https://api.eu.apyhub.com` (default region — see
`GET https://apyhub.com/api/public/regions` for the rest).

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/blueveta/service/detect-image-rotation-api
