Amazon Rekognition Custom Labels API

Train and use custom image classifiers.

Operations 1

POST /#DetectCustomLabels Detect Custom Labels #

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-custom-labels-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

amazon-rekognition-custom-labels-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Amazon Rekognition Custom Labels API
  version: '2016-06-27'
  description: Generated from AWS's published Smithy model for Amazon Rekognition. 1 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:
  /#DetectCustomLabels:
    post:
      operationId: DetectCustomLabels
      summary: Detect Custom Labels
      description: This operation applies only to Amazon Rekognition Custom Labels. Detects custom labels in a supplied image
        by using an Amazon Rekognition Custom Labels model. You specify which version of a model version to use by using the
        ProjectVersionArn input parameter. You pass the input image 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. For each object that the model version detects
        on an image, the API returns a (CustomLabel) object in an array (CustomLabels). Each CustomLabel object provides the
        label name (Name), the level of confidence that the image contains the object (Confidence), and object location information,
        if it exists, for the label on the image (Geometry). To filter labels that are returned, specify a value for MinConfidence.
        DetectCustomLabelsLabels only returns labels with a confidence that's higher than the specified value. The value of
        MinConfidence maps to the assumed threshold values created during training. For more information, see Assumed threshold
        in the Amazon Rekognition Cu
      responses:
        '200':
          description: Success
          content:
            application/x-amz-json-1.1:
              schema:
                $ref: '#/components/schemas/DetectCustomLabelsResponse'
              example:
                CustomLabels:
                - Name: with_leaves
                  Confidence: 67.56399536132812
                - Name: without_leaves
                  Confidence: 50.65699768066406
        '400':
          description: AccessDeniedException; ImageTooLargeException; InvalidImageFormatException; InvalidParameterException;
            InvalidS3ObjectException; LimitExceededException; ProvisionedThroughputExceededException; ResourceNotFoundException;
            ResourceNotReadyException
          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.DetectCustomLabels
      requestBody:
        required: true
        content:
          application/x-amz-json-1.1:
            schema:
              $ref: '#/components/schemas/DetectCustomLabelsRequest'
            example:
              ProjectVersionArn: arn:aws:rekognition:us-east-1:111122223333:project/my-project/version/my-project.2023-07-31T11.49.37/1690829378219
              Image:
                S3Object:
                  Bucket: custom-labels-console-us-east-1-1111111111
                  Name: assets/flowers_1_test_dataset/camellia4.jpg
              MaxResults: 100
              MinConfidence: 50
      tags:
      - Custom Labels
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.
    BoundingBox:
      type: object
      properties:
        Width:
          type: number
          description: Width of the bounding box as a ratio of the overall image width.
        Height:
          type: number
          description: Height of the bounding box as a ratio of the overall image height.
        Left:
          type: number
          description: Left coordinate of the bounding box as a ratio of overall image width.
        Top:
          type: number
          description: Top coordinate of the bounding box as a ratio of overall image height.
    CustomLabel:
      type: object
      properties:
        Name:
          type: string
          description: The name of the custom label.
        Confidence:
          type: number
          description: The confidence that the model has in the detection of the custom label. The range is 0-100. A higher
            value indicates a higher confidence.
        Geometry:
          $ref: '#/components/schemas/Geometry'
    DetectCustomLabelsRequest:
      type: object
      properties:
        ProjectVersionArn:
          type: string
          description: The ARN of the model version that you want to use. Only models associated with Custom Labels projects
            accepted by the operation. If a provided ARN refers to a model version associated with a project for a different
            feature type, then an InvalidParameterException is returned.
        Image:
          $ref: '#/components/schemas/Image'
        MaxResults:
          type: integer
          description: Maximum number of results you want the service to return in the response. The service returns the specified
            number of highest confidence labels ranked from highest confidence to lowest.
        MinConfidence:
          type: number
          description: Specifies the minimum confidence level for the labels to return. DetectCustomLabels doesn't return
            any labels with a confidence value that's lower than this specified value. If you specify a value of 0, DetectCustomLabels
            returns all labels, regardless of the assumed threshold applied to each label. If you don't specify a value for
            MinConfidence, DetectCustomLabels returns labels based on the assumed threshold of each label.
      required:
      - ProjectVersionArn
      - Image
    DetectCustomLabelsResponse:
      type: object
      properties:
        CustomLabels:
          type: array
          items:
            $ref: '#/components/schemas/CustomLabel'
          description: An array of custom labels detected in the input image.
    Geometry:
      type: object
      properties:
        BoundingBox:
          $ref: '#/components/schemas/BoundingBox'
        Polygon:
          type: array
          items:
            $ref: '#/components/schemas/Point'
          description: Within the bounding box, a fine-grained polygon around the detected item.
    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.
    Point:
      type: object
      properties:
        X:
          type: number
          description: The value of the X coordinate for a point on a Polygon.
        Y:
          type: number
          description: The value of the Y coordinate for a point on a Polygon.
    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.
x-provenance:
  method: harvested
  publisher: Amazon Web Services
  source: https://raw.githubusercontent.com/aws/api-models-aws/582e55931c45b944739742a2c1620b6026dd2d13/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)