Skip to main content

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.

Methods: generateModeration(), createModeration()

Example

<?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
Last modified on May 6, 2026