Share via


List Models - List Models

This operation returns the list of domain-specific models that are supported by the Computer Vision API. Currently, the API supports following domain-specific models: celebrity recognizer, landmark recognizer. A successful response will be returned in JSON. If the request failed, the response will contain an error code and a message to help understand what went wrong.

GET {Endpoint}/vision/v3.2/models

URI Parameters

Name In Required Type Description
Endpoint
path True

string

Supported Cognitive Services endpoints.

Request Header

Name Required Type Description
Ocp-Apim-Subscription-Key True

string

Responses

Name Type Description
200 OK

ListModelsResult

List of available domain models.

Other Status Codes

ComputerVisionErrorResponse

Error response.

Security

Ocp-Apim-Subscription-Key

Type: apiKey
In: header

Examples

Successful ListModels request

Sample request

GET https://westus.api.cognitive.microsoft.com/vision/v3.2/models

Sample response

{
  "models": [
    {
      "name": "celebrities",
      "categories": [
        "people_"
      ]
    },
    {
      "name": "landmarks",
      "categories": [
        "building_"
      ]
    }
  ]
}

Definitions

Name Description
ComputerVisionError

The API request error.

ComputerVisionErrorCodes

The error code.

ComputerVisionErrorResponse

The API error response.

ComputerVisionInnerError

Details about the API request error.

ComputerVisionInnerErrorCodeValue

The error code.

ListModelsResult

Result of the List Domain Models operation.

ModelDescription

An object describing supported model by name and categories.

ComputerVisionError

The API request error.

Name Type Description
code

ComputerVisionErrorCodes

The error code.

innererror

ComputerVisionInnerError

Inner error contains more specific information.

message

string

A message explaining the error reported by the service.

ComputerVisionErrorCodes

The error code.

Value Description
InvalidRequest
InvalidArgument
InternalServerError
ServiceUnavailable

ComputerVisionErrorResponse

The API error response.

Name Type Description
error

ComputerVisionError

Error contents.

ComputerVisionInnerError

Details about the API request error.

Name Type Description
code

ComputerVisionInnerErrorCodeValue

The error code.

message

string

Error message.

ComputerVisionInnerErrorCodeValue

The error code.

Value Description
InvalidImageFormat
UnsupportedMediaType
InvalidImageUrl
NotSupportedFeature
NotSupportedImage
Timeout
InternalServerError
InvalidImageSize
BadArgument
DetectFaceError
NotSupportedLanguage
InvalidThumbnailSize
InvalidDetails
InvalidModel
CancelledRequest
NotSupportedVisualFeature
FailedToProcess
Unspecified
StorageException

ListModelsResult

Result of the List Domain Models operation.

Name Type Description
models

ModelDescription[]

An array of supported models.

ModelDescription

An object describing supported model by name and categories.

Name Type Description
categories

string[]

Categories of the model.

name

string

The name of the model.