§ Transform
Rotate Image API
Multiples of 90 are lossless; other angles resample. An arbitrary angle exposes corners that were never part of the image, so the result gains an alpha channel unless you name an opaque background.
- Endpoint
- POST /image/rotate
- Inputs
- Exactly 1 image
- Returns
- The encoded image
- Limits
- 20 MB per file, 50 M pixels in, 50 M pixels out.
- Price
- $0.001
§ 01 The request
One POST, and the file comes back.
POST /image/rotate
curl -sS --fail-with-body \
-o turned.jpg \
-H "Authorization: Bearer $OHMYWRAP_KEY" \
-F "file=@photo.jpg" \
-F 'options={"angle":90}' \
https://api.ohmywrap.com/image/rotateOptions
| Option | Type | Default | What it does |
|---|---|---|---|
| angle | number | 0 | Multiples of 90 are lossless; other angles resample. |
| flip | bool | false | Mirror top to bottom. |
| flop | bool | false | Mirror left to right. |
| background | string | transparent | Corner fill for non-90° angles. |
| autoOrient | bool | true | Apply the EXIF orientation before transforming. Turning it off costs the shrink-on-load fast path. |
| animated | bool | false | Process every frame of an animated GIF or WebP instead of flattening to the first. |
| output | object | — | The shared encode block: format, quality, lossless, effort, progressive, keepMetadata. |
Worth knowing
A request that turns nothing is 422 nothing_to_do rather than a silent re-encode — it almost always means the wrong field was sent. For a deliberate re-encode, use /image/convert.
Your first /image/rotate call takes one line of curl.
Ten thousand calls cost ten dollars, the pack never expires, and nothing you send is kept.
10,000 calls for $10. No subscription, no expiry.