NAME

OpenAPI::Client::OpenAI::Path::moderations - Documentation for the /moderations path.

DESCRIPTION

This document describes the API endpoint at /moderations.

See the examples/ directory in the distribution for examples of how to use this.

POST /moderations

Classifies if text and/or image inputs are potentially harmful. Learn more in the [moderation guide](/docs/guides/moderation).

Operation ID

createModeration

$client->createModeration( ... );

Request Body

Content Type: application/json

Example:

{
   "model" : "omni-moderation-2024-09-26"
}

Responses

Status Code: 200

OK

Content Types:

  • application/json

    Example:

    {
       "results" : [
          {
             "category_scores" : null,
             "category_applied_input_types" : {
                "harassment" : [
                   null
                ],
                "self-harm/instructions" : [
                   null
                ],
                "hate/threatening" : [
                   null
                ],
                "illicit/violent" : [
                   null
                ],
                "violence" : [
                   null
                ],
                "sexual/minors" : [
                   null
                ],
                "illicit" : [
                   null
                ],
                "hate" : [
                   null
                ],
                "self-harm" : [
                   null
                ],
                "harassment/threatening" : [
                   null
                ],
                "self-harm/intent" : [
                   null
                ],
                "sexual" : [
                   null
                ],
                "violence/graphic" : [
                   null
                ]
             },
             "categories" : null
          }
       ]
    }

SEE ALSO

OpenAPI::Client::OpenAI::Path

COPYRIGHT AND LICENSE

Copyright (C) 2023-2025 by Nelson Ferraz

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.0 or, at your option, any later version of Perl 5 you may have available.