This API allows you to upload files (images or videos) and process them using various detection models.
To use this API, you need to include your API key in the Authorization header of your requests.
Authorization: Bearer YOUR_API_KEY
Use the following endpoint to upload and process a file:
POST /upload-file
file (required): The file you want to upload and process. Accepted formats: JPEG, PNG, JPG, GIF, MP4. Maximum size: 50 MB.models (required): An array of detection models to apply. Possible values: "face", "license_plate", "people", "vehicle".Here's an example of how to send a POST request using curl:
curl -X POST https://anonymizer.ai-things.ltd/api/upload-file \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@/path/to/your/file.jpg" \
-F "models[]=face" \
-F "models[]=people"
On success, the API will return a JSON response with the following structure:
{
"message": "File processed successfully.",
"original_file": "uploads/1234567890.jpg",
"processed_file": "uploads/processed_1234567890.jpg"
}
If the request fails, you may receive one of the following error responses:
401 Unauthorized: Invalid API key.400 Bad Request: Missing or invalid parameters.422 Unprocessable Entity: Validation errors (e.g., unsupported file type or size).500 Internal Server Error: Server encountered an error processing your request.