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

**Methods**: `generateModeration()`, `createModeration()`

### Example

```php theme={null}
<?php

require 'vendor/autoload.php';

use AIStats\Sdk\AIStats;

$apiKey = getenv('AI_STATS_API_KEY');
$client = new AIStats(apiKey: $apiKey);

$response = $client->createModeration([
    'model' => 'openai/omni-moderation-latest',
    'input' => 'Text to classify'
]);
echo $response['results'][0]['flagged'] ? 'Flagged' : 'Not flagged';
```

### Key parameters

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

### Returns

ModerationResponse
