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

# Moderations

> Call /moderations with the TypeScript SDK.

**Method**: `client.generateModeration()`.

### Example

```typescript theme={null}
const moderation = await client.generateModeration({
  model: "openai/omni-moderation-latest",
  input: "Text to classify",
});
```

### Key parameters

* `model` (required): Moderation model id (e.g., `openai/omni-moderation-latest`).
* `input` (required): String or array of content items (text or image\_url).
* Optional: `categories`/`severity` filters (when supported), `user` tag.

### Returns

`ModerationResponse`

```json theme={null}
{
  "results": [
    {
      "flagged": false,
      "categories": {
        "hate": false,
        "hate/threatening": false,
        "harassment": false,
        "harassment/threatening": false,
        "self-harm": false,
        "self-harm/intent": false,
        "self-harm/instructions": false,
        "sexual": false,
        "sexual/minors": false,
        "violence": false,
        "violence/graphic": false
      },
      "category_scores": {
        "hate": 0.01,
        "hate/threatening": 0.0,
        "harassment": 0.02,
        "harassment/threatening": 0.0,
        "self-harm": 0.0,
        "self-harm/intent": 0.0,
        "self-harm/instructions": 0.0,
        "sexual": 0.05,
        "sexual/minors": 0.0,
        "violence": 0.01,
        "violence/graphic": 0.0
      }
    }
  ]
}
```
