Are you building applications that require accurate face detection? TuttoApi offers a streamlined solution that allows you to quickly and easily identify faces within images with minimal effort.
Upload an image on the form above to test it.
import requests
url = "https://tuttoapi.com/api/face-detector/",
files = {"file": open('/path/to/image.jpeg', 'rb')},
headers = {"AUTHORIZATION": "Token YOUR_TOKEN"}
response = requests.post(url, files=files, headers=headers)
print(response.json())
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Token YOUR_TOKEN" \
-d '{"file": "path/to/image.jpg"}' \
https://tuttoapi.com/api/face-detector/
var input = document.querySelector('input[type="file"]')
var data = new FormData()
data.append('file', input.files[0])
fetch("http://tuttoapi.com/api/face-detector/", {
method: 'POST',
body: data,
headers: { 'AUTHORIZATION': 'Token YOUR_TOKEN' }
})
.then(response => {
response.json().then(result => {
console.log(result)
})
});
Here is an outline of the process of utilizing the API for face detection. This API allows you to quickly and reliably detect faces in images, integrating seamlessly into your software projects.
You’ll need to create an account to obtain a unique API Token.
Upon successful account creation, you will receive a Token, this is crucial for authenticating your API requests. Never hardcode your Token directly into your code. Store it securely.
You can call the API using a RESTful HTTP request. Here’s a breakdown of the process:
```bash
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: Token YOUR_TOKEN" \
-d '{
"file": "path/to/your/image.jpg",
"algorithm": "frontalface_default",
"scale_factor": 1.1,
"min_neighbors": 4
}' \
https://tuttoapi.com/api/face-detector/
```
{
"landmarks": [
{
"x": 103,
"y": 126,
"width": 309,
"height": 309
}
]
}