About this endpoint
What it does
Crops an uploaded image around detected faces or saliency and returns the processed image as a binary file.
Query Parameter(s)
| Attribute | Type | Description |
|---|---|---|
| aspect | String | Desired crop aspect ratio. Default: 1:1. Must match the pattern ^\d+(\.\d+)?:\d+(\.\d+)?$. |
| padding | Number | Extra padding around the detected crop area. Default: 0.18. Minimum: 0, maximum: 0.5. |
Request Body
| Parameter | Type | Description |
|---|---|---|
| file | Binary | Image file. Binary upload. Maximum size: 20 MB. |
Response
Returns a binary string containing the cropped image. The success response body is a single binary file, not a JSON object.
| Parameter | Type | Description |
|---|---|---|
| binary | String | Cropped image returned as binary data. |


