Skip to main content
Method: client.createModeration(...)
import ai.stats.sdk.AIStats;

AIStats client = new AIStats(System.getenv("AI_STATS_API_KEY"));

String body = """
{
  "model": "openai/omni-moderation",
  "input": "Please rate this message for safety"
}
""";

Object response = client.createModeration(body);
System.out.println(String.valueOf(response));
Last modified on May 6, 2026