Loading...
Animal Detect logo

API endpoint update

New integrations should use . Existing URLs will keep working for the next few months while teams migrate.

Batch Filter

1 credit / image
POST /v1/batch-filter

Filter up to 10 camera-trap images in one request and flag images with an animal, human, or vehicle.

Processing images regularly or at large scale?

Use this synchronous endpoint for first tests, debugging, and small workflows. For steady pipelines, larger files, or bursty camera-fleet uploads, approved customers can use Async Image Processing.

Open Async Image Processing
Try in Playground

Examples

Node.js / Express
const form = new FormData()
form.append('images', firstFile)
form.append('images', secondFile)
form.append('threshold', '0.2')
form.append('metadata', 'true')

const response = await fetch('https://api.animaldetect.com/v1/batch-filter', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer ' + process.env.ANIMAL_DETECT_API_KEY,
  },
  body: form,
})

const data = await response.json()
Example Response
{
  "id": "92d6a2f0-c143-4f91-b4be-5b51bf5d7d21",
  "expires_at": "2026-03-12T09:44:20.954Z",
  "results": [
    {
      "index": 0,
      "filename": "cam-1.jpg",
      "detections": [],
      "metadata": {
        "image_width": 4000,
        "image_height": 3000,
        "file_size": 2456789
      },
      "info": {
        "processing_time_ms": 330,
        "model_version": "mdv1000-redwood",
        "model_id": "mdv1000-redwood",
        "threshold_applied": 0.2
      }
    }
  ],
  "info": {
    "total_processed": 1,
    "total_time_ms": 330,
    "model_version": "mdv1000-redwood",
    "model_id": "mdv1000-redwood",
    "threshold_applied": 0.2
  }
}

Parameters

Required

file[] | base64[]

Array of 1-10 images. Combined upload request body limit is 20MB; combined raw image budget is 10MB.

Optional

string

Optional shared geofencing hint (CCA2/CCA3/full country name).

number

Confidence threshold between 0.01 and 0.99. Default: 0.2.

boolean

Set to `true` to include available image metadata on each batch result item.

Request Notes

Send multipart/form-data with repeated `images` fields or JSON with a base64 image array. Limits: 20MB request body and 10MB combined raw image data. Billing: 1 credit per image.

Status Codes

200Batch filtering completed.
400Validation error (empty list, too many images, invalid threshold).
413Batch payload too large for the sync upload limit.
401Invalid, missing, or revoked API key.
402Credit limit exceeded.
429Rate limit exceeded.
503AI processing service temporarily unavailable.

Notes

  • `metadata=true` includes metadata only for fields found in each image.