About this endpoint
What it does
Compresses a raster image fetched from a publicly accessible URL and returns the compressed file as binary data. The source image URL is sent in the request body, while compression options are passed as query parameters.
Query Parameter(s)
| Attribute | Type | Mandatory | Description |
|---|---|---|---|
| output | String | No | Output filename. |
| preserve_format | Boolean | No | Whether to preserve the input image format. Default: false. |
| compression_percentage | Integer | Yes | Compression percentage. Minimum: 1, maximum: 100. |
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| url | String | Yes | Publicly accessible URL of the raster image to compress. Supported formats: JPEG, PNG, WebP, GIF, TIFF, BMP. URLs with a missing recognized scheme are prefixed with https:// automatically. |
Response
Returns a binary file containing the compressed image. The response body is a raw binary stream rather than a JSON object.
| Parameter | Type | Mandatory | Description |
|---|