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 | Mandatory | Description |
|---|---|---|---|
| aspect | String | No | Desired crop aspect ratio. Default: 1:1. Must match the pattern ^\d+(\.\d+)?:\d+(\.\d+)?$. |
| padding | Number | No | Extra padding around the detected crop area. Default: 0.18. Minimum: 0, maximum: 0.5. |
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| file | String | Yes | 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 | Mandatory | Description |
|---|---|---|---|
| binary | String | Yes | Cropped image returned as binary data. |