Search…
⌃K

Image I/O

Input

Our API supports several options to provide source images that need to be processed.

HTTP(S) URL

URL of the input image. Should be from 1 to 512 characters. Image must be accessible by our system.
{
"input": "https://letsenhance.io/docs/assets/samples/burger.jpg"
}

Image upload

Our API also supports the ability to upload image content directly. Just make sure that all respective headers are set.

Connected storage

You can connect Cloud Storage and use it as a source for images. Currently, our API supports AWS S3 and Google Cloud Storage.
After connecting your Cloud Storage, you can refer the storage name as an input.
{
"input": "storage://storage-name/path/image-name.jpg"
}

Output

Configuration of result output is optional. By default, you may omit the output option from request payload. Then we store the result to the temporary bucket with a lifetime of 24 hours and provide a public URL to the image.
Alternatively, you can use a connected Cloud Storage: just configure pass to the folder where you want to store results.
We also provide the ability to specify advanced output, like image format, metadata (e.g. DPI), and even some format-specific options like PNG compression level, JPEG quality or using JPEG progressive display type.
Basic Usage
Advanced Usage
Advanced Format Usage
{
"output": "storage://storage-name/result-path/image-name.jpg"
}
"output": {
"destination": "storage://storage-name/result-path/image-name.jpg",
"format": "jpeg",
"metadata": {
"dpi": 300
}
}
"output": {
"destination": "storage://storage-name/result-path/image-name.jpg",
"format": {
"type": "jpeg",
"quality": 85,
"progressive": true
}
}
Please see below the full list of the advanced format-specific options:
jpeg
png
avif
Name
Type
Description
quality
integer
Specifies the amount of JPEG lossy compression in the range 1 - 100. Defaults to 85.
progressive
boolean
Progressive JPEG loads in a browser in successive waves until a clear picture is formed, thus improving the image loading speed. Used by default.
Name
Type
Description
compression
string
Indicates compression effort that will be applied during the PNG image encoding. Should have one of the values:
  • fast is used to apply minimum compression resulting in a bigger image size but less processing time.
  • best is used to apply maximum compression resulting in a smaller image size but more processing time.
  • optimal is the default and used to balance between compression effort and processing time.
Name
Type
Description
compression
string, object
The AVIF codec supports both lossless and lossy modes of operation, so you can select the one that is appropriate for your goals. Should have one of the values:
  • lossy is used to apply lossy compression to significantly reduce the image size in exchange for some loss of data, reducing the quality of an image.
  • {"type": "lossy", "quality": 1..100} is used to apply lossy compression and specify the amount of loss you are willing to accept. Defaults to 50.
  • lossless is used to apply lossless compression to preserve maximum image detail in exchange for a significantly increased file size.