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

# Mixed Inputs

> Moderate text and image content together in one request.

The moderation API accepts mixed typed arrays, which is useful when a single user submission contains both text and an image.

Use this for real user submissions that combine a caption, prompt, message, or comment with attached media.

## 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": "text", "text": "Caption this aggressively."},
          {
              "type": "image_url",
              "image_url": {"url": "https://example.com/post-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: 'text', text: 'Caption this aggressively.' },
      {
        type: 'image_url',
        image_url: { url: 'https://example.com/post-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": "text", "text": "Caption this aggressively." },
        {
          "type": "image_url",
          "image_url": { "url": "https://example.com/post-image.png" }
        }
      ]
    }'
  ```
</CodeGroup>

The response returns one moderation result payload covering the submitted request content.

## When this is useful

* moderating social posts with both text and an image
* screening user prompts that reference an uploaded image
* applying one safety check before a multimodal workflow continues

## Common mistakes

* sending separate moderation calls when your product logic really cares about the combined submission
* expecting separate per-item result objects instead of one result for the whole request
* mixing typed inputs incorrectly across text and image shapes
