---
title: Crop image around faces API
slug: smart-crop
url: https://apyhub.com/dosvak/service/smart-crop
provider: Dosvak LLC
categories: [Image Processing]
tags: [image-cropping, face-detection, saliency, thumbnail-generation, image-processing]
auth: api_key
---

# Crop image around faces API

Crop a binary image around faces or the most salient area. Set aspect ratio and padding, then receive the cropped image back.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `` | What it does Crops an uploaded image around detected faces or saliency and returns the processed im… | 100 |

## About

## What it does
Smart Crop crops an image around detected faces or visual saliency and returns the cropped image as binary output. Send a binary image file in the request body, and optionally tune the result with `aspect` and `padding` query parameters.

Use `aspect` to set the target ratio, such as `1:1` or `4:5`, and `padding` to control how much extra space is kept around the subject. The file input accepts an image up to 20 MB. That makes Smart Crop useful when you need consistent thumbnail framing for profile photos, product shots, social previews, or gallery cards without manually editing each image.

Because the service focuses on faces or the most salient part of the image, it helps preserve the subject while adapting the crop to different layouts. The response is the cropped image itself, so you can pass it straight into storage, delivery, or a downstream image pipeline.

## Usage

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