# rotateimage: Rotate Image

> rotateimage (Rotate Image) is a 1001fx API function in the group Images: POST https://api.1001fx.com/images/rotateimage, 3 credits per call. It works as a ready-made module in Make or as a plain HTTP call.

Rotates an image clockwise by any angle (90, 180, 270 or free). With free angles the canvas grows and the corners are filled with the background color (transparent for PNG).

- Group: Images
- Endpoint: `POST https://api.1001fx.com/images/rotateimage`
- Authentication: header `X-API-KEY: YOURSECRETAPIKEY`
- Content type: multipart/form-data
- Credits: 3 credits per call
- Ready-made in: Make
- Docs: https://1001fx.com/functions/rotateimage

## Parameters

- `file` (file, optional) – File: The image (PNG, JPEG, BMP, TIFF, GIF). Either file or fileUrl.
- `fileUrl` (string, optional) – File URL: Public URL of the image. Either file or fileUrl.
- `angle` (number, required) – Angle: Degrees clockwise, e.g. 90.
- `background` (string, optional) – Background: Fill color for free angles, e.g. #ffffff; default transparent.
- `outputFormat` (enum, optional, one of `png`, `jpeg`, `bmp`, `tiff`, `gif`) – Output format: Format of the result; default: same as the input.

## Example: Rotate Image

```bash
curl -X POST 'https://api.1001fx.com/images/rotateimage' \
  -H 'X-API-KEY: YOURSECRETAPIKEY'
```
