Loading...
Animal Detect logo

Batch Detect

Consumes credits
POST /api/v1/batch-detect

Processes each image in sequence and returns per-image annotations in a unified result payload.

Try in Playground

Required Parameters

  • images (file[] | base64[]) Array of 1-10 images.

Optional Parameters

  • threshold (number) Confidence threshold between 0.01 and 0.99. Default: 0.2.

Supports multipart/form-data (`images` repeated) and application/json with base64 string array.

Status Codes

200Batch detection completed.
400Validation error (empty list, too many images, invalid threshold).
401Invalid, missing, or revoked API key.
402Quota exceeded.
429Rate limit exceeded.
500Internal or upstream service error.
Node.js / Express
const form = new FormData()
form.append('images', firstFile)
form.append('images', secondFile)
form.append('threshold', '0.2')

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

const data = await response.json()

Example Response

JSON
{
  "id": "aa367f74-fd47-4ce3-97d6-12f48f3e6d03",
  "expires_at": "2026-03-12T09:44:20.954Z",
  "results": [
    {
      "index": 0,
      "filename": "cam-1.jpg",
      "annotations": [],
      "info": {
        "processing_time_ms": 643,
        "model_version": "v1.0",
        "threshold_applied": 0.2
      }
    }
  ],
  "info": {
    "total_processed": 1,
    "total_time_ms": 643
  }
}