# Additional parameters

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

<table><thead><tr><th width="251">Parameter name</th><th>Description</th></tr></thead><tbody><tr><td>quality</td><td>Integer value for the level of jpeg or webp compression.</td></tr><tr><td>output_format</td><td>The format of the output image:<br><br>- jpeg<br>- png<br>- webp</td></tr><tr><td>max_file_size</td><td>Integer or string value with maximum file size.<br>It supports "<strong>kb</strong>", "<strong>mb</strong>" and "<strong>gb</strong>" units.<br>It is used with output_format equals jpeg or webp. When specified, Deep Image API tries to match highest possible jpeg quality and specified <strong>max_file_size</strong>.</td></tr><tr><td>safe</td><td>Boolean value that turns on NSFW filtering.</td></tr><tr><td>nsfw_parameters</td><td>Configuration of safe filter:<br>- threshold (0-1 float value)<br>- nsfw_image_url (optional image url returned when threshold is exceeded)</td></tr></tbody></table>

Output format, quality and max file size example:

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

Safe filter example:

```json
{
    "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)
