Loading...
Animal Detect logo

Detect

Consumes credits
POST /api/v1/detect

Runs SpeciesNet detection and returns normalized bounding boxes with taxonomy, plus a retrievable request ID.

Try in Playground

Required Parameters

  • image (file | base64 string) Image data (5MB max).

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.

Supports multipart/form-data (recommended for files) and application/json with base64 image.

Status Codes

200Detection completed.
400Validation error (bad payload/threshold/image).
401Invalid, missing, or revoked API key.
402Quota exceeded.
413File too large.
429Rate limit exceeded.
500Internal or upstream service error.
Node.js / Express
const form = new FormData()
form.append('image', imageFile)
form.append('country', 'USA')
form.append('threshold', '0.2')

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

const data = await response.json()

Example Response

JSON
{
  "id": "5e4e5dbd-2604-46b4-bb87-8f42fd682b08",
  "expires_at": "2026-03-12T09:44:20.954Z",
  "annotations": [
    {
      "id": 0,
      "bbox": [0.41, 0.82, 0.20, 0.17],
      "score": 0.997,
      "label": "canine family",
      "taxonomy": {
        "id": "3184697f-51ad-4608-9a28-9edb5500159c",
        "class": "mammalia",
        "order": "carnivora",
        "family": "canidae",
        "genus": "",
        "species": ""
      }
    }
  ],
  "info": {
    "processing_time_ms": 919,
    "model_version": "v1.0",
    "country_processed": "USA",
    "threshold_applied": 0.2
  }
}