> For the complete documentation index, see [llms.txt](https://documentation.deep-image.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.deep-image.ai/image-processing/additional-parameters.md).

# 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)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentation.deep-image.ai/image-processing/additional-parameters.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
