Compress an image using file upload, URL, or base64-encoded data. Returns the compressed image binary with metadata in response headers.
API key for authentication. Get your key at https://compresto.app/dashboard
Provide either 'image' (base64) or 'url'. If both are provided, 'url' takes priority.
Base64-encoded image (with or without data URI prefix)
Public image URL (https)
Compression quality (1-100)
1 <= x <= 100Output format
auto, jpeg, png, webp Maximum width in pixels (maintains aspect ratio)
x >= 1Maximum height in pixels (maintains aspect ratio)
x >= 1Compressed image binary
The response is of type file.