--- title: "Image Moderation" url: https://docs.catalyst.zoho.com/en/sdk/javascript/v1/zia-services/image-moderation/ description: "This page describes the method to perform operations using the components in Zia Services." last_updated: 2026-09-09T10:45:38Z service: Zia Services type: general related_links: - name: "Catalyst Zia Services" url: /en/zia-services/ - name: "Image Moderation Help Documentation" url: /en/zia-services/help/image-moderation/introduction/ - name: "Java SDK Documentation" url: /en/sdk/java/v1/zia-services/image-moderation/ - name: "Python SDK Documentation" url: /en/sdk/python/v1/zia-services/image-moderation/ - name: "REST API Documentation" url: /en/api/code-reference/zia-services/image-moderation/#ImageModeration repository: name: "Repository" url: https://github.com/catalystbyzoho/zcatalyst-sdk-js --- # Image Moderation > **Note:** Ensure you have installed the [required package](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/zia-services/overview/#prerequisites) to use this SDK method. [Image Moderation](https://docs.catalyst.zoho.com/en/zia-services/help/image-moderation/introduction) detects and recognizes inappropriate and unsafe content in images. The criteria include suggestive or explicit racy content, nudity, violence, gore, bloodshed, and the presence of weapons and drugs. You can provide a *.jpg*/*.jpeg* or *.png* file as the input. Refer to the [API documentation](https://docs.catalyst.zoho.com/en/api/code-reference/zia-services/image-moderation/#ImageModeration) for the request and response formats. You can set the moderation mode as `BASIC`, `MODERATE`, or A`DVANCED` optionally. The image is processed in the `ADVANCED` mode by default. The `zia` reference used in the code snippets below is the [component instance](https://docs.catalyst.zoho.com/en/sdk/javascript/v1/zia-services/get-zia-instance/) created to perform these operations. The promise returned here is resolved to a JSON object. ```javascript const fs = require('fs'); const result = await zia.moderateImage(fs.createReadStream('./weapon.png'), {mode: 'moderate'}); //Pass the input file and the mode console.log(result); ``` #### Example of Expected Response A sample response that you will receive is shown below. The response returns the probability of each criteria with their confidence scores, and the prediction of the image being `safe_to_use` or `unsafe_to_use`. ```javascript { "probability": { "racy": "0.09", "nudity": "0.06" }, "confidence": "0.85", "prediction": "safe_to#_use" } ```