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.1/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

ComputerVisionError

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.1/models

Sample response

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

Definitions

Name Description
ComputerVisionError

Details about the API request error.

ComputerVisionErrorCodes

The error code.

ListModelsResult

Result of the List Domain Models operation.

ModelDescription

An object describing supported model by name and categories.

ComputerVisionError

Details about the API request error.

Name Type Description
code

ComputerVisionErrorCodes

The error code.

message

string

A message explaining the error reported by the service.

requestId

string

A unique request identifier.

ComputerVisionErrorCodes

The error code.

Name Type Description
BadArgument

string

CancelledRequest

string

DetectFaceError

string

FailedToProcess

string

InternalServerError

string

InvalidDetails

string

InvalidImageFormat

string

InvalidImageSize

string

InvalidImageUrl

string

InvalidModel

string

InvalidThumbnailSize

string

NotSupportedFeature

string

NotSupportedImage

string

NotSupportedLanguage

string

NotSupportedVisualFeature

string

StorageException

string

Timeout

string

Unspecified

string

UnsupportedMediaType

string

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.