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

# Image Moderation

> Classify remote images with typed moderation inputs.

Image moderation uses typed `image_url` input objects.

Use it to screen uploaded or linked images before generation, display, or publishing.

## Example

<CodeGroup>
  ```python Python theme={null}
  from openai import OpenAI

  client = OpenAI(
      base_url="https://api.naga.ac/v1",
      api_key="YOUR_API_KEY",
  )

  result = client.moderations.create(
      model="omni-moderation-latest",
      input=[
          {
              "type": "image_url",
              "image_url": {"url": "https://example.com/image.png"},
          }
      ],
  )

  print(result.results[0].flagged)
  ```

  ```javascript Node.js theme={null}
  import OpenAI from 'openai';

  const client = new OpenAI({
    baseURL: 'https://api.naga.ac/v1',
    apiKey: 'YOUR_API_KEY',
  });

  const result = await client.moderations.create({
    model: 'omni-moderation-latest',
    input: [
      {
        type: 'image_url',
        image_url: { url: 'https://example.com/image.png' },
      },
    ],
  });

  console.log(result.results[0].flagged);
  ```

  ```bash cURL theme={null}
  curl https://api.naga.ac/v1/moderations \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "model": "omni-moderation-latest",
      "input": [
        {
          "type": "image_url",
          "image_url": {
            "url": "https://example.com/image.png"
          }
        }
      ]
    }'
  ```
</CodeGroup>

Use this when you need to screen uploaded or linked images before further processing.

## Common uses

* checking uploaded profile images or attachments
* screening images before passing them into a multimodal model
* applying different review paths for safe vs risky media

## Common mistakes

* trying to send a plain string instead of a typed image object
* assuming the moderation result replaces your own product policy logic
* forgetting that image availability and URL validity still matter at request time
