Loading...
Animal Detect logo

Filter

1 credit / request
POST /api/v1/filter

Best for classical wildlife camera traps when you want to separate empty images from images that contain an object of interest. Returns bounding boxes plus coarse labels only.

Try in Playground

Required 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: camera-trap 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', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer ' + process.env.ANIMAL_DETECT_API_KEY,
  },
  body: form,
})

const data = await response.json()

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