---
title: Image Cropper
slug: crop-image
url: https://apyverse.com/apyhub/service/crop-image
provider: ApyHub
categories: [File Manipulation, Image Processing]
tags: [image-cropping, image-processing, file-manipulation, url-to-image, multipart-upload]
auth: api_key
---

# Image Cropper

Crop images from a URL or uploaded file. Get back binary output or a signed URL, with dimension or margin-based cropping.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `/processor/image/crop/url/file` | What it does Crops an image fetched from a URL and returns the cropped file as binary data. The end… | 30 |
| POST | `/processor/image/crop/file-urls` | What it does Crops an image fetched from a URL and returns a time-limited signed URL for the croppe… | 30 |
| POST | `/processor/image/crop/file` | What it does Crops an uploaded image and returns the cropped file as a binary download. You can cro… | 30 |
| POST | `/processor/image/crop/file/url` | What it does Crops an uploaded image and returns a time-limited signed URL to the generated file. T… | 30 |

## About

## What it does
Image Cropper lets you crop an image from a URL or an uploaded file and get back either the cropped binary file or a time-limited signed URL.

Use URL mode when the image is already hosted: send `url` for dimension mode, or `image_url` with `top`, `bottom`, `left`, and `right` for margin mode. In dimension mode, provide `width` and `height` as query parameters to crop a box from the top-left origin. In margin mode, the four edge insets are strings such as `10px` or `5%`.

Use multipart mode when you want to upload the source image directly. Send `image` as a binary file, then crop with the same dimension or margin patterns. Supported upload formats include JPEG, PNG, WebP, GIF, TIFF, and BMP.

The responses are simple: download endpoints return the cropped image as binary, while link endpoints return a JSON object with `data`, a pre-signed URL to the stored crop. Set `preserve_format` when you want to keep the original format, and use `output` to name the generated file.

## Usage

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