Image Transforms
Crop Image
Crop a rectangular region out of an image.
GET/api/crop?url=&left=&top=&width=&height=
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| url | string | Required | Public http(s) URL of the source image (max 10 MB). |
| left | integer | Optional | Left edge of the crop area in pixels. Default 0. |
| top | integer | Optional | Top edge of the crop area in pixels. Default 0. |
| width | integer | Required | Width of the crop area. |
| height | integer | Required | Height of the crop area. |
| format | string | Optional | Output format: png, jpeg, webp, avif or gif. |
| quality | integer | Optional | 1-100 for jpeg/webp/avif. Default 80. |
Try it
Saved only in this browser. Requests use your key and count toward your quota. Get a key
GET /api/cropExample request
curl "https://your-app.com/api/crop?url=https%3A%2F%2Fexample.com%2Fphoto.jpg&left=50&top=50&width=100&height=100" \
-H "x-api-key: YOUR_API_KEY" \
--output cropped.pngResponse
Content-Type: image/png (or the requested format) — the cropped image. Returns 400 if the area exceeds the image.