POST
/
v1
/
images
/
{image_id}
/
classify
curl --request POST \
  --url https://api.img-processing.com/v1/images/{image_id}/classify \
  --header 'x-api-key: <api-key>'
{
  "main_label": "Tabby",
  "main_score": 0.4316079616546631,
  "secondary_labels": [
    {
      "label": "Tiger Cat",
      "score": 0.37503865361213684
    },
    {
      "label": "Egyptian Cat",
      "score": 0.124073326587677
    },
    {
      "label": "Plastic Bag",
      "score": 0.007065261714160442
    },
    {
      "label": "Lynx",
      "score": 0.003809159155935049
    }
  ]
}

Description

The classify endpoint allows you to classify an image using a pre-trained model. At the moment, the only supported model is the ResNet50 model, a deep learning model that excels at image classification tasks.

The endpoint will return a list of labels and their probabilities for the image.

Test images may return accurate results due the test watermarks applied to them. If you want to get better results, please use live images. If you just want to test this feature, contact support to temporarily upgrade your account.


Authorizations

x-api-key
string
header
required

API Key for authentication

Path Parameters

image_id
string
required

The unique identifier of the image. This identifier is used to reference the image in subsequent requests.

Response

201
application/json

The API will return the Image object in the response body.

Response object for image identification. Contains the main label and secondary labels with their scores.