This section provides detailed information about the Image Classification API, which is designed to classify images into predefined categories.
Overview
The Image Classification API allows users to upload an image and receive a classification result. It is built on top of a robust machine learning model that has been trained on a diverse set of images.
Usage
To use the Image Classification API, you need to send a POST request to the following endpoint:
POST /api/v1/image-classification
You must include the following headers in your request:
Content-Type: application/json
Authorization: Bearer <your_access_token>
Here is an example of a JSON payload you can send with your request:
{
"image": "base64-encoded-image-string"
}
Response
The API will respond with a JSON object containing the classification result. Here is an example of what the response might look like:
{
"status": "success",
"classification": {
"label": "dog",
"confidence": 0.95
}
}
In the response, the label
field contains the classification result, and the confidence
field indicates the model's confidence in its prediction.
Additional Resources
For more information about the Image Classification API, please refer to the following resources: