Amazon Rekognition Stored Video Analysis API

Asynchronous analysis of videos stored in Amazon S3.

OpenAPI Specification

amazon-rekognition-stored-video-analysis-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Amazon Rekognition Celebrity Recognition Stored Video Analysis API
  description: Amazon Rekognition is a cloud-based computer vision service providing image and video analysis including label detection, facial analysis, face comparison, celebrity recognition, text detection, content moderation, custom labels, face liveness detection, and streaming video analysis.
  version: '2016-06-27'
  contact:
    name: AWS Support
    url: https://aws.amazon.com/contact-us/
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  x-generated-from: documentation
servers:
- url: https://rekognition.amazonaws.com
  description: Amazon Rekognition global endpoint
tags:
- name: Stored Video Analysis
  description: Asynchronous analysis of videos stored in Amazon S3.
paths:
  /#StartLabelDetection:
    post:
      operationId: startLabelDetection
      summary: Amazon Rekognition Start Label Detection
      description: Starts asynchronous detection of labels in a stored video.
      tags:
      - Stored Video Analysis
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/StartLabelDetectionRequest'
            examples:
              startLabelDetectionRequestExample:
                summary: Default startLabelDetection request
                x-microcks-default: true
                value:
                  Video:
                    S3Object:
                      Bucket: my-videos-bucket
                      Name: clip.mp4
                  MinConfidence: 75.0
      responses:
        '200':
          description: Label detection job started successfully.
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/StartVideoJobResponse'
              examples:
                startLabelDetection200Example:
                  summary: Default startLabelDetection 200 response
                  x-microcks-default: true
                  value:
                    JobId: 1234567890abcdef
        '400':
          description: Invalid request.
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - aws_signature: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /#GetLabelDetection:
    post:
      operationId: getLabelDetection
      summary: Amazon Rekognition Get Label Detection
      description: Gets the label detection results of a Rekognition Video analysis started by StartLabelDetection.
      tags:
      - Stored Video Analysis
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/GetVideoJobResultRequest'
            examples:
              getLabelDetectionRequestExample:
                summary: Default getLabelDetection request
                x-microcks-default: true
                value:
                  JobId: 1234567890abcdef
                  MaxResults: 100
      responses:
        '200':
          description: Label detection results retrieved successfully.
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/GetLabelDetectionResponse'
              examples:
                getLabelDetection200Example:
                  summary: Default getLabelDetection 200 response
                  x-microcks-default: true
                  value:
                    JobStatus: SUCCEEDED
                    Labels: []
                    LabelModelVersion: '3.0'
        '400':
          description: Invalid request.
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - aws_signature: []
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    StartLabelDetectionRequest:
      type: object
      required:
      - Video
      properties:
        Video:
          $ref: '#/components/schemas/Video'
        ClientRequestToken:
          type: string
        MinConfidence:
          type: number
          format: float
          example: 75.0
        NotificationChannel:
          $ref: '#/components/schemas/NotificationChannel'
        JobTag:
          type: string
        Features:
          type: array
          items:
            type: string
        Settings:
          type: object
    GetLabelDetectionResponse:
      type: object
      properties:
        JobStatus:
          type: string
          enum:
          - IN_PROGRESS
          - SUCCEEDED
          - FAILED
          example: SUCCEEDED
        StatusMessage:
          type: string
        VideoMetadata:
          type: object
        NextToken:
          type: string
        Labels:
          type: array
          items:
            type: object
            properties:
              Timestamp:
                type: integer
              Label:
                $ref: '#/components/schemas/Label'
        LabelModelVersion:
          type: string
        JobId:
          type: string
    ErrorResponse:
      type: object
      description: Standard error response from the Amazon Rekognition API.
      properties:
        __type:
          type: string
          description: The type of exception.
          example: InvalidParameterException
        message:
          type: string
          description: Human-readable description of the error.
          example: Request has invalid parameters.
    NotificationChannel:
      type: object
      description: Amazon SNS topic for completion status notifications.
      properties:
        SNSTopicArn:
          type: string
          description: The Amazon SNS topic ARN to post completion status.
          example: arn:aws:sns:us-east-1:123456789012:AmazonRekognitionTopic
        RoleArn:
          type: string
          description: The ARN of an IAM role that gives Rekognition publishing permissions.
          example: arn:aws:iam::123456789012:role/RekognitionRole
    Video:
      type: object
      description: Video file stored in an Amazon S3 bucket.
      properties:
        S3Object:
          $ref: '#/components/schemas/S3Object'
    GetVideoJobResultRequest:
      type: object
      required:
      - JobId
      properties:
        JobId:
          type: string
          description: Job identifier from the start job call.
          example: 1234567890abcdef
        MaxResults:
          type: integer
          example: 100
        NextToken:
          type: string
        SortBy:
          type: string
          enum:
          - NAME
          - TIMESTAMP
        AggregateBy:
          type: string
          enum:
          - TIMESTAMPS
          - SEGMENTS
    BoundingBox:
      type: object
      description: Identifies the bounding box around the label, face, text or object.
      properties:
        Width:
          type: number
          format: float
          description: Width of the bounding box as a ratio of the overall image width.
          example: 0.35
        Height:
          type: number
          format: float
          description: Height of the bounding box as a ratio of the overall image height.
          example: 0.45
        Left:
          type: number
          format: float
          description: Left coordinate of the bounding box as a ratio of overall image width.
          example: 0.1
        Top:
          type: number
          format: float
          description: Top coordinate of the bounding box as a ratio of overall image height.
          example: 0.05
    S3Object:
      type: object
      description: Provides the S3 bucket name and object name.
      properties:
        Bucket:
          type: string
          description: Name of the S3 bucket.
          example: my-images-bucket
        Name:
          type: string
          description: S3 object key name.
          example: images/photo.jpg
        Version:
          type: string
          description: S3 object version ID if versioning is enabled.
          example: v1
    StartVideoJobResponse:
      type: object
      properties:
        JobId:
          type: string
          description: The identifier for the video analysis job.
          example: 1234567890abcdef
    Label:
      type: object
      description: Structure containing details about the detected label.
      properties:
        Name:
          type: string
          description: The name of the label detected in the image or video.
          example: Person
        Confidence:
          type: number
          format: float
          description: Level of confidence for the label.
          example: 98.5
        Instances:
          type: array
          description: Bounding boxes for each instance of the detected object.
          items:
            type: object
            properties:
              BoundingBox:
                $ref: '#/components/schemas/BoundingBox'
              Confidence:
                type: number
                format: float
        Parents:
          type: array
          description: The parent labels for a label in the taxonomy hierarchy.
          items:
            type: object
            properties:
              Name:
                type: string
  securitySchemes:
    aws_signature:
      type: apiKey
      in: header
      name: Authorization
      description: AWS Signature Version 4. Include the Authorization header with AWS4-HMAC-SHA256 signature.