> ## Documentation Index
> Fetch the complete documentation index at: https://docs.contentmod.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Image Moderation

> Get an image moderation by its ID

To get an image moderation by its ID, use the `image.get` function:

```ts index.ts theme={null}
import { ContentMod } from "@contentmod/sdk";

const contentMod = new ContentMod({
  publicKey: "<YOUR_PUBLIC_KEY>",
  secretKey: "<YOUR_SECRET_KEY>",
});

const moderationId = "<MODERATION_ID>";

const imageMod = await contentMod.image.get(moderationId);

console.log(imageMod);
```

Please refer to the [Get Image Api Response](/api-reference/image/get) for more information on the `ImageModerationResponse` object.

## Properties

<ResponseField name="image" type="string" required>
  Image to moderate

  Example: `https://example.com/image.jpg`
</ResponseField>

<ResponseField name="options" type="object" exp>
  An object of options for the moderation request

  <Expandable title="Options" defaultOpen>
    <ResponseField name="meta" type="object">
      Any additional metadata you want to include with the moderation request that will be saved.

      Example:`{"userId": "1234"}`
    </ResponseField>

    <ResponseField name="callbackUrl" type="string">
      A webhook callback url that will be called when the moderation request is completed.

      Example: `https://example.com/webhook`
    </ResponseField>

    <ResponseField name="defer" type="boolean">
      Whether to defer the moderation request.
      If this value is true the request will be queued and you will receive the response later in a webhook that you have set up. Or you can look it up
      later using the id returned.

      Example: `true`
    </ResponseField>
  </Expandable>
</ResponseField>

## Response

The `ImageModerationResponse` object contains the following properties:

<ResponseField name="id" type="string" required>
  The ID of the moderation request.

  Example: `27fbdc0b-b295-46ce-93f5-81b2fc08a381`
</ResponseField>

<ResponseField name="isSafe" type="boolean" required>
  Whether the image is considered safe.

  Example: `true`
</ResponseField>

<ResponseField name="confidence" type="number" required>
  Confidence of the safety of the image from 1-100.

  Example: `90`
</ResponseField>

<ResponseField name="sentiment" type="string" required>
  Sentiment of the image, either negative, neutral or positive.

  available sentiment values are:

  * negative
  * neutral (default)
  * positive

  Example: `positive`
</ResponseField>

<ResponseField name="sentimentScore" type="number" required>
  Sentiment score from 1-100 (negative, neutral, positive).

  Example: `90`
</ResponseField>

<ResponseField name="riskScores" type="object" required>
  Overall risk score from 1-100.

  Example: `90`
</ResponseField>

<ResponseField name="topics" type="array" required>
  General topics the image depicts, lowercase and no punctuation.

  Example: `["politics", "sports"]`
</ResponseField>

<ResponseField name="nsfwCategories" type="array" required>
  An array of the categories of the image.
  The available categories are:

  * adult\_content
  * suggestive\_imagery
  * strong\_language
  * violence\_gore
  * horror\_disturbing
  * alcohol
  * tobacco
  * substance\_use
  * gambling
  * dating\_relationship
  * medical\_procedures"
  * crude\_humor
  * political\_content

  Example: `[{"category": "sexual", "severity": 90}]`
</ResponseField>

<ResponseField name="summary" type="object" required>
  Summary of the image.

  <Expandable title="Summary" defaultOpen>
    <ResponseField name="totalFlags" type="number" required>
      Total flags.

      Example: `1`
    </ResponseField>

    <ResponseField name="contentRating" type="string" required>
      Content rating of the image (e.g. G, PG, PG-13, R, NC-17).

      Example: `G`
    </ResponseField>

    <ResponseField name="language" type="string" required>
      The language code of the text, eg. en, fr, de.

      Example: `en`
    </ResponseField>
  </Expandable>

  Example: `{"profanity": true, "totalFlags": 1, "contentRating": "G", "language": "en"}`
</ResponseField>

<ResponseField name="suggestedActions" type="object" required>
  Suggested actions for the image.

  <Expandable title="Suggested Actions" defaultOpen>
    <ResponseField name="reject" type="boolean" required>
      Whether to reject the image.

      Example: `true`
    </ResponseField>

    <ResponseField name="review" type="boolean" required>
      Whether to flag the image.

      Example: `true`
    </ResponseField>
  </Expandable>

  Example: `{"reject": true, "review": true}`
</ResponseField>

<ResponseField name="request" type="object" required>
  The request object.

  Example: `{"requestId": "27fbdc0b-b295-46ce-93f5-81b2fc08a381", "timestamp": "2023-04-05T12:00:00.000Z"}`
</ResponseField>

<ResponseField name="meta" type="object" required>
  The metadata of the request object that the user provided.

  Example: `{"userId": "12345"}`
</ResponseField>

<ResponseField name="hash" type="string" required>
  The SHA-256 hash of the image.
  Used for content comparison purposes.

  Example: `93a08bd10cd367bf83f12ba6590fcaef2f8deec8a47ce4ce88a15c7dda325ffa`
</ResponseField>
