API Documentation
  • Welcome!
  • Quick Start
  • API methods
  • Easy integration
  • Easily Copy Pre-Formatted API Requests for Integration
  • Handling Large File Sets
  • Supported formats
  • Webhooks
  • Common usecases
    • Auto enhance image quality
    • Create business photo or avatar from face image
    • Face swap
    • Create beautiful product photo
    • Genarate image in high resolution
    • Remove background
    • AI Drawing to Image - Doodle
    • Real estate
    • Enhancing documents
    • Car dealer photo
  • Image processing
    • Resize and padding
    • Denoise and sharpen
    • Enhance lighting and colors
    • Enhance face details
    • Background removal and generation
    • Image generation
    • Inpainting and outpainting (uncrop)
    • Frame identification
    • Print
    • Captions
    • Additional parameters
    • Presets
  • Account & settings
    • Account information
  • storages
    • Overview
    • Usage
    • Setup
      • AWS S3
      • OneDrive
      • Dropbox
      • Google Drive
  • Presets
    • E-commerce
    • Real-estate
    • Print/Photo
    • Digital Art
  • Technology
    • Algorithms
    • Upscale
    • Background removal
      • Remove BG recommendation
    • Sharpen & Noise reduction
    • Enhance Lighting
  • FAQ
Powered by GitBook
On this page
  1. Image processing

Additional parameters

There are also parameters that controls level of jpeg compression and output image format.

Parameter name
Description

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:

{
    "url": "image_url",
    "width": 1000,
    "height": 1000,
    "output_format": "jpeg",
    "quality": 85,
    "max_file_size": "1MB"
}

Safe filter example:

{
    "url": "https://deep-image.ai/api-example3.jpg",
    "safe": true,
    "nsfw_parameters": {
        "thresold": 0.0,
        "image_url": "https://deep-image.ai/api-example2.jpg"
    }
}

This will return image specified in nsfw_parameters.image_url because safe filter threshold has been set to 0 (always fail)

PreviousCaptionsNextPresets

Last updated 14 days ago