Filter
Metered / request/v1/filterQuickly separate empty camera trap images from images with an animal, human, or vehicle. Returns bounding boxes and coarse labels only.
Processing images regularly or at large scale?
Use this Instant detection endpoint for first tests, debugging, and small workflows. For steady pipelines, larger files, or bursty camera-fleet uploads, approved customers can use Detection jobs.
Open Detection jobsParameters
Required
Image data. Upload request body limit is 20 MB; raw image budget is 10 MB.
Optional
Optional geofencing hint (CCA2/CCA3/full country name).
Confidence threshold between 0.01 and 0.99. Default: 0.2.
Set to true to include available image metadata in the response.
Request notes
Send multipart/form-data for files or JSON with a base64 image. Limits: 20 MB request body and 10 MB raw image.
Response fields
Required. Request id. Also sent as the X-Request-Id header; use it with GET /detect/{id} and when writing to support.
Required. When GET /detect/{id} stops returning this result.
Required. One entry per detected object. Empty when nothing scored above threshold.
Required. Position of the detection in this response, starting at 0.
Required. Bounding box as [x, y, width, height], normalised to the image size (0 to 1), origin at the top-left corner. Multiply by the pixel width and height to draw it.
Required. Confidence of the detection.
Required. Same value as category.
Required. Coarse class of the detected object.
Optional. Image metadata found in the file (image_width, image_height, file_size, EXIF fields when present). Only with metadata=true.
Required. processing_time_ms, model_id, model_version, threshold_applied, and country_processed when a country was recognised.
Optional. Present when the country value was not recognised and the request ran without geofencing.
Status codes
Notes
- POST requests must send a
User-Agentheader that names your application; without one the API answers 400USER_AGENT_REQUIRED. - Best for: camera trap empty-vs-object screening.
metadata=trueincludes metadata only for fields found in the source image.- Returns only coarse categories:
animal,human,vehicle.
Examples
curl -X POST "https://api.animaldetect.com/v1/filter" -H "Authorization: Bearer $ANIMAL_DETECT_API_KEY" -H "User-Agent: MyApp/1.0 (ops@example.com)" -F "image=@/path/to/camera-trap.jpg" -F "threshold=0.2" -F "metadata=true"import os
import requests
with open("/path/to/camera-trap.jpg", "rb") as image:
response = requests.post(
"https://api.animaldetect.com/v1/filter",
headers={
"Authorization": "Bearer " + os.environ["ANIMAL_DETECT_API_KEY"],
"User-Agent": "MyApp/1.0 (ops@example.com)",
},
files={"image": image},
data={
"threshold": "0.2",
"metadata": "true"
},
)
response.raise_for_status()
data = response.json()const form = new FormData()
form.append('image', imageFile)
form.append('threshold', '0.2')
form.append('metadata', 'true')
const response = await fetch('https://api.animaldetect.com/v1/filter', {
method: 'POST',
headers: {
Authorization: 'Bearer ' + process.env.ANIMAL_DETECT_API_KEY,
},
body: form,
})
const data = await response.json(){
"id": "8f3770e5-d7ad-4067-9f31-70b16f4a6262",
"expires_at": "2026-03-12T09:44:20.954Z",
"detections": [
{
"id": 0,
"bbox": [0.22, 0.18, 0.41, 0.53],
"score": 0.97,
"label": "animal",
"category": "animal"
}
],
"metadata": {
"image_width": 4000,
"image_height": 3000,
"file_size": 2456789
},
"info": {
"processing_time_ms": 455,
"model_version": "mdv1000-redwood",
"model_id": "mdv1000-redwood",
"threshold_applied": 0.2
}
}