Filter Urban
1 credit / requestPOST /api/v1/filter-urbanBest for urban, indoor, roadside, zoo, farm, and other human-modified settings when you want fast empty-vs-object screening. Returns bounding boxes plus coarse labels only.
Try in PlaygroundRequired Parameters
image(file | base64 string) Image data. Practical raw limit is about 1.1MB because Vertex enforces a 1.5MB encoded request cap.
Optional Parameters
country(string) Optional geofencing hint (CCA2/CCA3/full country name).threshold(number) Confidence threshold between 0.01 and 0.99. Default: 0.2.metadata(boolean) Optional. Set to `true` to include available image metadata in the response.
Supports multipart/form-data (recommended for files) and application/json with base64 image. Set `metadata=true` to request available image metadata in the response. This Vertex-backed route enforces the upstream 1.5MB request cap, so keep raw images around 1.1MB or less.
Status Codes
200Filtering completed.
400Validation error (bad payload, threshold, or image).
401Invalid, missing, or revoked API key.
402Credit limit exceeded.
413Payload too large for the Vertex-backed request limit.
429Rate limit exceeded.
503Upstream Vertex service error.
- Best for: urban, indoor, roadside, zoo, farm, and other human-modified empty-vs-object screening.
- When `metadata=true`, the response includes a `metadata` object only for the fields the source image actually contains.
- Returns only coarse categories: `animal`, `human`, `vehicle`.
Node.js / Express
const form = new FormData()
form.append('image', imageFile)
form.append('threshold', '0.2')
form.append('metadata', 'true')
const response = await fetch('https://www.animaldetect.com/api/v1/filter-urban', {
method: 'POST',
headers: {
Authorization: 'Bearer ' + process.env.ANIMAL_DETECT_API_KEY,
},
body: form,
})
const data = await response.json()Example Response
JSON
{
"id": "753c34fb-9202-4da2-b1d5-3f0c020db674",
"expires_at": "2026-03-12T09:44:20.954Z",
"detections": [
{
"id": 0,
"bbox": [0.22, 0.18, 0.41, 0.53],
"score": 0.96,
"label": "human",
"category": "human"
}
],
"metadata": {
"image_width": 4000,
"image_height": 3000,
"file_size": 2456789
},
"info": {
"processing_time_ms": 388,
"model_version": "mdv5",
"model_id": "mdv5",
"threshold_applied": 0.2
}
}