About this endpoint
What it does
Restores a stretched image to a target aspect ratio by accepting an uploaded image file and returning the processed image as binary data.
Query Parameter(s)
| Attribute | Type | Mandatory | Description |
|---|---|---|---|
| target_aspect | String | No | Target aspect ratio for the restored image. Must match the pattern ^\d+(\.\d+)?:\d+(\.\d+)?$. Default: 1:1. |
| keep_long_edge | Boolean | No | Whether to keep the long edge while restoring the image. Default: true. |
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| file | String | Yes | Image file, binary format. Maximum size: 20 MB. |
Response
Returns a binary file containing the restored image. The success response is a raw binary payload, not a JSON object.