Skip to main content
POST
/
utils
/
media
/
images
/
compress
Error
A valid request URL is required to generate request examples
{
  "success": true,
  "data": {
    "url": "<string>",
    "original_size_kb": 123,
    "compressed_size_kb": 123,
    "compression_ratio": 123,
    "format": "<string>",
    "activity_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  }
}

Authorizations

Authorization
string
header
required

Enter token in format (Bearer )

Body

multipart/form-data
quality
integer
required

Compression quality

Required range: 1 <= x <= 100
Example:

85

image
file

The image file

url
string<uri>

Alternative: URL of image

format
enum<string>
Available options:
jpg,
png,
webp,
gif,
avif
Example:

"webp"

keep_forever
boolean
Example:

false

Response

200 - application/json

Image compressed successfully

success
boolean
Example:

true

data
object