Amazon Rekognition Content Moderation API

Detect inappropriate or explicit content.

GitHub OpenAPI

Operations 3

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /#GetContentModeration Get a video's moderation results · Get Content Moderation #
Ask an LLM
“Has the inappropriate content analysis on my video finished?”
“Can I get the moderation labels detected in a video by aggregation?”
Tell an agent
Get the content moderation results for job {JobId}.
Show moderation labels for {JobId} sorted by {SortBy}.
POST /#StartContentModeration Start video content moderation · Start Content Moderation #
Ask an LLM
“How do I moderate a stored video for inappropriate content?”
“Can I get a notification when video moderation finishes?”
Tell an agent
Start content moderation on video {Video}.
Moderate {Video} with a confidence threshold of {MinConfidence}.
POST /#DetectModerationLabels Detect unsafe content in an image · Detect Moderation Labels #
Ask an LLM
“Can I check a single image for nudity or suggestive content?”
“What labels does Rekognition return for an image I upload?”
Tell an agent
Detect moderation labels in image {Image}.
Moderate {Image} and return labels with confidence at least {MinConfidence}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/amazon-rekognition:amazon-rekognition-content-moderation-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

amazon-rekognition-content-moderation-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon Rekognition Content Moderation API
  version: '2016-06-27'
  description: Generated from AWS's published Smithy model for Amazon Rekognition. 3 operation(s).
  contact:
    name: Amazon Web Services
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    identifier: Apache-2.0
    url: https://github.com/aws/api-models-aws/blob/main/LICENSE
servers:
- url: https://rekognition.{region}.amazonaws.com
  variables:
    region:
      default: us-east-1
security:
- sigv4: []
paths:
  /#GetContentModeration:
    post:
      operationId: GetContentModeration
      summary: Get Content Moderation
      description: Gets the inappropriate, unwanted, or offensive content analysis results for a Amazon Rekognition Video
        analysis started by StartContentModeration. For a list of moderation labels in Amazon Rekognition, see Using the image
        and video moderation APIs. Amazon Rekognition Video inappropriate or offensive content detection in a stored video
        is an asynchronous operation. You start analysis by calling StartContentModeration which returns a job identifier
        (JobId). When analysis finishes, Amazon Rekognition Video publishes a completion status to the Amazon Simple Notification
        Service topic registered in the initial call to StartContentModeration. To get the results of the content analysis,
        first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetContentModeration
        and pass the job identifier (JobId) from the initial call to StartContentModeration. For more information, see Working
        with Stored Videos in the Amazon Rekognition Devlopers Guide. GetContentModeration returns detected inappropriate,
        unwanted, or offensive content moderation labels, and the time they are detected, in an array, ModerationLabels, of
        ContentModerationDetection objects. By default
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/GetContentModerationResponse'
        '400':
          description: AccessDeniedException; InvalidPaginationTokenException; InvalidParameterException; ProvisionedThroughputExceededException;
            ResourceNotFoundException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '500':
          description: InternalServerError; ThrottlingException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InternalServerError'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - RekognitionService.GetContentModeration
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/GetContentModerationRequest'
      tags:
      - Content Moderation
  /#StartContentModeration:
    post:
      operationId: StartContentModeration
      summary: Start Content Moderation
      description: Starts asynchronous detection of inappropriate, unwanted, or offensive content in a stored video. For a
        list of moderation labels in Amazon Rekognition, see Using the image and video moderation APIs. Amazon Rekognition
        Video can moderate content in a video stored in an Amazon S3 bucket. Use Video to specify the bucket name and the
        filename of the video. StartContentModeration returns a job identifier (JobId) which you use to get the results of
        the analysis. When content analysis is finished, Amazon Rekognition Video publishes a completion status to the Amazon
        Simple Notification Service topic that you specify in NotificationChannel. To get the results of the content analysis,
        first check that the status value published to the Amazon SNS topic is SUCCEEDED. If so, call GetContentModeration
        and pass the job identifier (JobId) from the initial call to StartContentModeration. For more information, see Moderating
        content in the Amazon Rekognition Developer Guide.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/StartContentModerationResponse'
        '400':
          description: AccessDeniedException; IdempotentParameterMismatchException; InvalidParameterException; InvalidS3ObjectException;
            LimitExceededException; ProvisionedThroughputExceededException; VideoTooLargeException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '500':
          description: InternalServerError; ThrottlingException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InternalServerError'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - RekognitionService.StartContentModeration
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/StartContentModerationRequest'
      tags:
      - Content Moderation
  /#DetectModerationLabels:
    post:
      operationId: DetectModerationLabels
      summary: Detect Moderation Labels
      description: Detects unsafe content in a specified JPEG or PNG format image. Use DetectModerationLabels to moderate
        images depending on your requirements. For example, you might want to filter images that contain nudity, but not images
        containing suggestive content. To filter images, use the labels returned by DetectModerationLabels to determine which
        types of content are appropriate. For information about moderation labels, see Detecting Unsafe Content in the Amazon
        Rekognition Developer Guide. You pass the input image either as base64-encoded image bytes or as a reference to an
        image in an Amazon S3 bucket. If you use the AWS CLI to call Amazon Rekognition operations, passing image bytes is
        not supported. The image must be either a PNG or JPEG formatted file. You can specify an adapter to use when retrieving
        label predictions by providing a ProjectVersionArn to the ProjectVersion argument.
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/DetectModerationLabelsResponse'
        '400':
          description: AccessDeniedException; ImageTooLargeException; InvalidImageFormatException; InvalidParameterException;
            InvalidS3ObjectException; ProvisionedThroughputExceededException; ResourceNotFoundException; ResourceNotReadyException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/AccessDeniedException'
        '402':
          description: HumanLoopQuotaExceededException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/HumanLoopQuotaExceededException'
        '500':
          description: InternalServerError; ThrottlingException
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/InternalServerError'
      parameters:
      - name: X-Amz-Target
        in: header
        required: true
        schema:
          type: string
          enum:
          - RekognitionService.DetectModerationLabels
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/DetectModerationLabelsRequest'
      tags:
      - Content Moderation
components:
  securitySchemes:
    sigv4:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. The Authorization header carries an AWS4-HMAC-SHA256 signature over the canonical
        request, with X-Amz-Date (and X-Amz-Security-Token for temporary credentials). Not a bearer token.
      x-aws-sigv4:
        signingName: rekognition
  schemas:
    AccessDeniedException:
      type: object
      properties:
        Message:
          type: string
        Code:
          type: string
        Logref:
          type: string
          description: A universally unique identifier (UUID) for the request.
    ContentModerationDetection:
      type: object
      properties:
        Timestamp:
          type: integer
          description: Time, in milliseconds from the beginning of the video, that the content moderation label was detected.
            Note that Timestamp is not guaranteed to be accurate to the individual frame where the moderated content first
            appears.
        ModerationLabel:
          $ref: '#/components/schemas/ModerationLabel'
        StartTimestampMillis:
          type: integer
          description: The time in milliseconds defining the start of the timeline segment containing a continuously detected
            moderation label.
        EndTimestampMillis:
          type: integer
          description: The time in milliseconds defining the end of the timeline segment containing a continuously detected
            moderation label.
        DurationMillis:
          type: integer
          description: The time duration of a segment in milliseconds, I.e. time elapsed from StartTimestampMillis to EndTimestampMillis.
        ContentTypes:
          type: array
          items:
            $ref: '#/components/schemas/ContentType'
          description: A list of predicted results for the type of content an image contains. For example, the image content
            might be from animation, sports, or a video game.
    ContentType:
      type: object
      properties:
        Confidence:
          type: number
          description: The confidence level of the label given
        Name:
          type: string
          description: The name of the label
    DetectModerationLabelsRequest:
      type: object
      properties:
        Image:
          $ref: '#/components/schemas/Image'
        MinConfidence:
          type: number
          description: Specifies the minimum confidence level for the labels to return. Amazon Rekognition doesn't return
            any labels with a confidence level lower than this specified value. If you don't specify MinConfidence, the operation
            returns labels with confidence values greater than or equal to 50 percent.
        HumanLoopConfig:
          $ref: '#/components/schemas/HumanLoopConfig'
        ProjectVersion:
          type: string
          description: Identifier for the custom adapter. Expects the ProjectVersionArn as a value. Use the CreateProject
            or CreateProjectVersion APIs to create a custom adapter.
      required:
      - Image
    DetectModerationLabelsResponse:
      type: object
      properties:
        ModerationLabels:
          type: array
          items:
            $ref: '#/components/schemas/ModerationLabel'
          description: Array of detected Moderation labels. For video operations, this includes the time, in milliseconds
            from the start of the video, they were detected.
        ModerationModelVersion:
          type: string
          description: Version number of the base moderation detection model that was used to detect unsafe content.
        HumanLoopActivationOutput:
          $ref: '#/components/schemas/HumanLoopActivationOutput'
        ProjectVersion:
          type: string
          description: Identifier of the custom adapter that was used during inference. If during inference the adapter was
            EXPIRED, then the parameter will not be returned, indicating that a base moderation detection project version
            was used.
        ContentTypes:
          type: array
          items:
            $ref: '#/components/schemas/ContentType'
          description: A list of predicted results for the type of content an image contains. For example, the image content
            might be from animation, sports, or a video game.
    GetContentModerationRequest:
      type: object
      properties:
        JobId:
          type: string
          description: The identifier for the inappropriate, unwanted, or offensive content moderation job. Use JobId to identify
            the job in a subsequent call to GetContentModeration.
        MaxResults:
          type: integer
          description: Maximum number of results to return per paginated call. The largest value you can specify is 1000.
            If you specify a value greater than 1000, a maximum of 1000 results is returned. The default value is 1000.
        NextToken:
          type: string
          description: If the previous response was incomplete (because there is more data to retrieve), Amazon Rekognition
            returns a pagination token in the response. You can use this pagination token to retrieve the next set of content
            moderation labels.
        SortBy:
          type: string
          enum:
          - NAME
          - TIMESTAMP
          description: Sort to use for elements in the ModerationLabelDetections array. Use TIMESTAMP to sort array elements
            by the time labels are detected. Use NAME to alphabetically group elements for a label together. Within each label
            group, the array element are sorted by detection confidence. The default sort is by TIMESTAMP.
        AggregateBy:
          type: string
          enum:
          - TIMESTAMPS
          - SEGMENTS
          description: Defines how to aggregate results of the StartContentModeration request. Default aggregation option
            is TIMESTAMPS. SEGMENTS mode aggregates moderation labels over time.
      required:
      - JobId
    GetContentModerationRequestMetadata:
      type: object
      properties:
        SortBy:
          type: string
          enum:
          - NAME
          - TIMESTAMP
          description: The sorting method chosen for a GetContentModeration request.
        AggregateBy:
          type: string
          enum:
          - TIMESTAMPS
          - SEGMENTS
          description: The aggregation method chosen for a GetContentModeration request.
    GetContentModerationResponse:
      type: object
      properties:
        JobStatus:
          type: string
          enum:
          - IN_PROGRESS
          - SUCCEEDED
          - FAILED
          description: The current status of the content moderation analysis job.
        StatusMessage:
          type: string
          description: If the job fails, StatusMessage provides a descriptive error message.
        VideoMetadata:
          $ref: '#/components/schemas/VideoMetadata'
        ModerationLabels:
          type: array
          items:
            $ref: '#/components/schemas/ContentModerationDetection'
          description: The detected inappropriate, unwanted, or offensive content moderation labels and the time(s) they were
            detected.
        NextToken:
          type: string
          description: If the response is truncated, Amazon Rekognition Video returns this token that you can use in the subsequent
            request to retrieve the next set of content moderation labels.
        ModerationModelVersion:
          type: string
          description: Version number of the moderation detection model that was used to detect inappropriate, unwanted, or
            offensive content.
        JobId:
          type: string
          description: Job identifier for the content moderation operation for which you want to obtain results. The job identifer
            is returned by an initial call to StartContentModeration.
        Video:
          $ref: '#/components/schemas/Video'
        JobTag:
          type: string
          description: A job identifier specified in the call to StartContentModeration and returned in the job completion
            notification sent to your Amazon Simple Notification Service topic.
        GetRequestMetadata:
          $ref: '#/components/schemas/GetContentModerationRequestMetadata'
    HumanLoopActivationOutput:
      type: object
      properties:
        HumanLoopArn:
          type: string
          description: The Amazon Resource Name (ARN) of the HumanLoop created.
        HumanLoopActivationReasons:
          type: array
          items:
            type: string
          description: Shows if and why human review was needed.
        HumanLoopActivationConditionsEvaluationResults:
          type: string
          description: Shows the result of condition evaluations, including those conditions which activated a human review.
    HumanLoopConfig:
      type: object
      properties:
        HumanLoopName:
          type: string
          description: The name of the human review used for this image. This should be kept unique within a region.
        FlowDefinitionArn:
          type: string
          description: The Amazon Resource Name (ARN) of the flow definition. You can create a flow definition by using the
            Amazon Sagemaker CreateFlowDefinition Operation.
        DataAttributes:
          $ref: '#/components/schemas/HumanLoopDataAttributes'
      required:
      - HumanLoopName
      - FlowDefinitionArn
    HumanLoopDataAttributes:
      type: object
      properties:
        ContentClassifiers:
          type: array
          items:
            type: string
            enum:
            - FreeOfPersonallyIdentifiableInformation
            - FreeOfAdultContent
          description: Sets whether the input image is free of personally identifiable information.
    HumanLoopQuotaExceededException:
      type: object
      properties:
        ResourceType:
          type: string
          description: The resource type.
        QuotaCode:
          type: string
          description: The quota code.
        ServiceCode:
          type: string
          description: The service code.
        Message:
          type: string
        Code:
          type: string
        Logref:
          type: string
          description: A universally unique identifier (UUID) for the request.
    Image:
      type: object
      properties:
        Bytes:
          type: string
          format: byte
          description: Blob of image bytes up to 5 MBs. Note that the maximum image size you can pass to DetectCustomLabels
            is 4MB.
        S3Object:
          $ref: '#/components/schemas/S3Object'
    InternalServerError:
      type: object
      properties:
        Message:
          type: string
        Code:
          type: string
        Logref:
          type: string
          description: A universally unique identifier (UUID) for the request.
    ModerationLabel:
      type: object
      properties:
        Confidence:
          type: number
          description: Specifies the confidence that Amazon Rekognition has that the label has been correctly identified.
            If you don't specify the MinConfidence parameter in the call to DetectModerationLabels, the operation returns
            labels with a confidence value greater than or equal to 50 percent.
        Name:
          type: string
          description: The label name for the type of unsafe content detected in the image.
        ParentName:
          type: string
          description: The name for the parent label. Labels at the top level of the hierarchy have the parent label "".
        TaxonomyLevel:
          type: integer
          description: The level of the moderation label with regard to its taxonomy, from 1 to 3.
    NotificationChannel:
      type: object
      properties:
        SNSTopicArn:
          type: string
          description: The Amazon SNS topic to which Amazon Rekognition posts the completion status.
        RoleArn:
          type: string
          description: The ARN of an IAM role that gives Amazon Rekognition publishing permissions to the Amazon SNS topic.
      required:
      - SNSTopicArn
      - RoleArn
    S3Object:
      type: object
      properties:
        Bucket:
          type: string
          description: Name of the S3 bucket.
        Name:
          type: string
          description: S3 object key name.
        Version:
          type: string
          description: If the bucket is versioning enabled, you can specify the object version.
    StartContentModerationRequest:
      type: object
      properties:
        Video:
          $ref: '#/components/schemas/Video'
        MinConfidence:
          type: number
          description: Specifies the minimum confidence that Amazon Rekognition must have in order to return a moderated content
            label. Confidence represents how certain Amazon Rekognition is that the moderated content is correctly identified.
            0 is the lowest confidence. 100 is the highest confidence. Amazon Rekognition doesn't return any moderated content
            labels with a confidence level lower than this specified value. If you don't specify MinConfidence, GetContentModeration
            returns labels with confidence values greater than or equal to 50 percent.
        ClientRequestToken:
          type: string
          description: Idempotent token used to identify the start request. If you use the same token with multiple StartContentModeration
            requests, the same JobId is returned. Use ClientRequestToken to prevent the same job from being accidently started
            more than once.
        NotificationChannel:
          $ref: '#/components/schemas/NotificationChannel'
        JobTag:
          type: string
          description: An identifier you specify that's returned in the completion notification that's published to your Amazon
            Simple Notification Service topic. For example, you can use JobTag to group related jobs and identify them in
            the completion notification.
      required:
      - Video
    StartContentModerationResponse:
      type: object
      properties:
        JobId:
          type: string
          description: The identifier for the content analysis job. Use JobId to identify the job in a subsequent call to
            GetContentModeration.
    Video:
      type: object
      properties:
        S3Object:
          $ref: '#/components/schemas/S3Object'
    VideoMetadata:
      type: object
      properties:
        Codec:
          type: string
          description: Type of compression used in the analyzed video.
        DurationMillis:
          type: integer
          description: Length of the video in milliseconds.
        Format:
          type: string
          description: Format of the analyzed video. Possible values are MP4, MOV and AVI.
        FrameRate:
          type: number
          description: Number of frames per second in the video.
        FrameHeight:
          type: integer
          description: Vertical pixel dimension of the video.
        FrameWidth:
          type: integer
          description: Horizontal pixel dimension of the video.
        ColorRange:
          type: string
          enum:
          - FULL
          - LIMITED
          description: A description of the range of luminance values in a video, either LIMITED (16 to 235) or FULL (0 to
            255).
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/3cd98287b471c106254abd89279cc87308d38bfd/models/rekognition/service/2016-06-27/rekognition-2016-06-27.json
  note: converted by smithy-to-openapi.py from AWS's Smithy model (roadmap#1001)