Welcome to the API documentation. Follow the instructions below to use the API for image uploads and detection.
To use the API, you must first register or log in to the platform to obtain your API key.
Register Here Log In HereOnce logged in, you will find your API key in your profile settings. You will need this key to authenticate your requests.
Use the following endpoint to upload an image:
POST /api/upload-image
Your requests must include the following header for authorization:
Authorization: Bearer {API_KEY}
The request should contain the following parameters:
image (required): The image file you want to upload. Accepted formats: JPEG, PNG, GIF. Maximum size: 2 MB.Here’s an example of how to send a POST request using curl:
curl -X POST http://yourdomain.com/api/upload-image \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "image=@/path/to/your/image.jpg"
On success, the API will return a JSON response with the detection result:
{
"message": "Image uploaded and forwarded successfully.",
"response": {
"detection_results": [ ... ] // Example of detection data
}
}
If the request fails, you may receive one of the following error codes:
401 Unauthorized: Invalid API key.400 Bad Request: Missing or invalid parameters.500 Internal Server Error: Server encountered an error processing your request.