apyhub
Back

Rotate Image API

What it does

Image Rotation rotates an uploaded image by 90, 180, or 270 degrees and returns the rotated file as binary output.

Send a single image in the file field, choose the rotation degrees, and optionally set format to png or jpeg for the output. The upload supports images up to 15 MB. The response is the rotated image itself, so you can pass it straight into storage, upload, or a later image pipeline step.

Use Image Rotation when you need to correct camera orientation, standardise user-uploaded media, or prepare assets for a fixed layout. It fits cleanly into workflows where images arrive in inconsistent orientation and need a quick transform before display or processing.

Because the output is binary, this service is best when you want the transformed image back immediately rather than a JSON wrapper around file metadata.

POST
Rotate an image
https://api.eu.apyhub.com/freedailypro/rotate-image-api/image-rotate

QUICKSTART

GUIDE

Quickstart

Rotate an image by sending the file and rotation degrees as a multipart upload.

curl -X POST "https://api.eu.apyhub.com/freedailypro/rotate-image-api/image-rotate" \
  -H "apy-token: $APY_TOKEN" \
  -F "file=@/path/to/image.jpg" \
  -F "degrees=90"

What you'll get back

Returns a binary file in the response body — the rotated image itself.

TRY ITLIVE · 10 ATOMS
Loading your default key…
The full key is used to call the gateway and stays in this tab — never sent to orbit or saved.
Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.
body*
The image. Up to 15 MB.
Rotation in degrees: 90, 180 or 270
Output format: png or jpeg

About this endpoint

What it does

Rotates an image by 90, 180 or 270 degrees and returns the rotated image as a file. You can choose PNG or JPEG for the output.

Use it to fix sideways phone uploads, normalise orientation in an upload pipeline, or prepare assets before display. Upload an image of up to 15 MB, pick the rotation, and get the rotated image back in the response body

Request Body

ParameterTypeMandatoryDescription
fileStringYesThe image file to rotate. Up to 15 MB.
formatStringNoOutput image format. Accepted values: png or jpeg.
degreesENUMYesRotation in degrees. Allowed values: 90, 180, 270.

Response

Returns a binary file containing the rotated image.

Max 100MB total per request (all files combined). Larger? Use this API's URL-based endpoint instead, if it has one.

▣ COMMON ERRORS

Errors any endpoint can return

400bad_request

Required parameter missing or malformed body.

401unauthorized

API key missing, revoked, or not authorized for this service.

429rate_limited

Your plan's per-second rate exceeded. Retry with exponential backoff.

503upstream_busy

Backend temporarily unavailable. Try again in a few seconds.