v1

latestOpenAPI 3.0.32026-07-26451985.7 KB

image-classification

Categorize images into predefined classes for tasks like object recognition, medical imaging, and security systems

post/models/v2/google/vit-base-patch16-224

Request body

urlstring required
base64string

Example request

{
  "url": "https://www.padoniavets.com/sites/default/files/field/image/cats-and-dogs.jpg",
  "base64": "data:image/jpg;base64,...BASE_64_GOES_HERE (Only use this is you are not using a url)"
}

Response

Successful image-classification response.

errorstring nullable required

Null on success; otherwise an error message.

Example response

{
  "output": [
    {
      "label": "beagle",
      "score": 0.5398777723312378
    },
    {
      "label": "Egyptian cat",
      "score": 0.12709936499595642
    },
    {
      "label": "English foxhound",
      "score": 0.04305768758058548
    },
    {
      "label": "tabby, tabby cat",
      "score": 0.03387906029820442
    },
    {
      "label": "Walker hound, Walker foxhound",
      "score": 0.02507072128355503
    }
  ]
}