Additional parameters
There are also parameters that controls level of jpeg compression and output image format.
quality
Integer value for the level of jpeg or webp compression.
output_format
The format of the output image: - jpeg - png - webp
max_file_size
Integer or string value with maximum file size. It supports "kb", "mb" and "gb" units. It is used with output_format equals jpeg or webp. When specified, Deep Image API tries to match highest possible jpeg quality and specified max_file_size.
safe
Boolean value that turns on NSFW filtering.
nsfw_parameters
Configuration of safe filter: - threshold (0-1 float value) - nsfw_image_url (optional image url returned when threshold is exceeded)
Output format, quality and max file size example:
Safe filter example:
This will return image specified in nsfw_parameters.image_url because safe filter threshold has been set to 0 (always fail)
Last updated