API Documentation - File Upload and Processing

This API allows you to upload files (images or videos) and process them using various detection models.

Authentication

To use this API, you need to include your API key in the Authorization header of your requests.

Authorization: Bearer YOUR_API_KEY

API Endpoint

Use the following endpoint to upload and process a file:

POST /upload-file

Request Parameters

Example Request

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"

Response

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

Error Handling

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

Notes