API Documentation

Welcome to the API documentation. Follow the instructions below to use the API for image uploads and detection.

Authentication

To use the API, you must first register or log in to the platform to obtain your API key.

Register Here Log In Here

Once logged in, you will find your API key in your profile settings. You will need this key to authenticate your requests.

API Endpoint

Use the following endpoint to upload an image:

POST /api/upload-image

Headers

Your requests must include the following header for authorization:

Authorization: Bearer {API_KEY}

Parameters

The request should contain the following parameters:

Example Request

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"

Response

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
    }
}

Error Handling

If the request fails, you may receive one of the following error codes: