=encoding utf8

=head1 NAME

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

=head1 OPERATIONS

=head2 POST /moderations

=head3 createModeration

  $client->create_moderation({
      body => { ... },
  });

Classifies if text and/or image inputs are potentially harmful. Learn more in
the L<moderation guide|https://platform.openai.com/docs/guides/moderation> .

=head4 Request body

Content-Type: application/json

Example:

    {
       "id" : "modr-AB8CjOTu2jiq12hp1AQPfeqFWaORR",
       "model" : "text-moderation-007",
       "results" : [
          {
             "categories" : {
                "harassment" : true,
                "harassment/threatening" : true,
                "hate" : false,
                "hate/threatening" : false,
                "self-harm" : false,
                "self-harm/instructions" : false,
                "self-harm/intent" : false,
                "sexual" : false,
                "sexual/minors" : false,
                "violence" : true,
                "violence/graphic" : false
             },
             "category_scores" : {
                "harassment" : 0.521563529968262,
                "harassment/threatening" : 0.569474577903748,
                "hate" : 0.22706663608551,
                "hate/threatening" : 0.0235473290085793,
                "self-harm" : 2.22711992137192e-06,
                "self-harm/instructions" : 1.11987552564585e-09,
                "self-harm/intent" : 1.6469409729325e-06,
                "sexual" : 1.17260124170571e-05,
                "sexual/minors" : 7.10735221787218e-08,
                "violence" : 0.997113466262817,
                "violence/graphic" : 3.39182988682296e-05
             },
             "flagged" : true
          }
       ]
    }

=head4 Responses

B<200 - OK>

Content-Type: application/json

Example:

    {
       "id" : "modr-AB8CjOTu2jiq12hp1AQPfeqFWaORR",
       "model" : "text-moderation-007",
       "results" : [
          {
             "categories" : {
                "harassment" : true,
                "harassment/threatening" : true,
                "hate" : false,
                "hate/threatening" : false,
                "self-harm" : false,
                "self-harm/instructions" : false,
                "self-harm/intent" : false,
                "sexual" : false,
                "sexual/minors" : false,
                "violence" : true,
                "violence/graphic" : false
             },
             "category_scores" : {
                "harassment" : 0.521563529968262,
                "harassment/threatening" : 0.569474577903748,
                "hate" : 0.22706663608551,
                "hate/threatening" : 0.0235473290085793,
                "self-harm" : 2.22711992137192e-06,
                "self-harm/instructions" : 1.11987552564585e-09,
                "self-harm/intent" : 1.6469409729325e-06,
                "sexual" : 1.17260124170571e-05,
                "sexual/minors" : 7.10735221787218e-08,
                "violence" : 0.997113466262817,
                "violence/graphic" : 3.39182988682296e-05
             },
             "flagged" : true
          }
       ]
    }

=head1 SCHEMAS

=head2 CreateModerationRequest

Properties:

=over

=item * C<input> (oneOf, required) - Input (or inputs) to classify. Can be a single string, an array of strings, or
an array of multi-modal input objects similar to other models.

=item * C<model> (anyOf) - The content moderation model you would like to use. Learn more in
L<the moderation guide|https://platform.openai.com/docs/guides/moderation> ,
and learn about available models
L<here|https://platform.openai.com/docs/models#moderation> .

Default: omni-moderation-latest

=back

=head2 CreateModerationResponse

Properties:

=over

=item * C<id> (string, required) - The unique identifier for the moderation request.

=item * C<model> (string, required) - The model used to generate the moderation results.

=item * C<results> (array of object, required) - A list of moderation objects.

=back

=head1 SEE ALSO

L<OpenAPI::Client::OpenAI::Path>

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2023-2026 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.

=cut
