1. Go to this page and download the library: Download moderyo/sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
moderyo / sdk example snippets
use Moderyo\ModeryoClient;
$client = new ModeryoClient('your-api-key');
$result = $client->moderate('Hello, this is a friendly message!');
if ($result->isBlocked) {
echo "BLOCKED: " . ($result->policyDecision?->reason ?? 'Policy violation') . "\n";
} elseif ($result->isFlagged) {
echo "FLAGGED for review\n";
} else {
echo "ALLOWED\n";
}