Loading...
Animal Detect logo

Detect Urban

1 credit / request
POST /api/v1/detect-urban

Best for urban, indoor, roadside, zoo, farm, and other human-modified settings. Use this endpoint to analyze one image and get bounding boxes plus taxonomy-rich labels.

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.

Supports multipart/form-data (recommended for files) and application/json with base64 image. This Vertex-backed route enforces the upstream 1.5MB request cap, so keep raw images around 1.1MB or less.

Status Codes

200Detection 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 scenes.
  • Returns the same rich annotation shape as `/detect`, but optimized for a different image domain.
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-urban', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer ' + process.env.ANIMAL_DETECT_API_KEY,
  },
  body: form,
})

const data = await response.json()

Example Response

JSON
{
  "id": "c2f3d6ca-8390-49d4-b103-cc82975a5d48",
  "expires_at": "2026-03-12T09:44:20.954Z",
  "annotations": [
    {
      "id": 0,
      "bbox": [0.12, 0.24, 0.31, 0.44],
      "score": 0.98,
      "label": "red fox",
      "taxonomy": {
        "id": "species-id",
        "class": "mammalia",
        "order": "carnivora",
        "family": "canidae",
        "genus": "vulpes",
        "species": "vulpes vulpes"
      }
    }
  ],
  "info": {
    "processing_time_ms": 812,
    "model_version": "mdv5-speciesnet",
    "model_id": "mdv5-speciesnet",
    "country_processed": "USA",
    "threshold_applied": 0.2
  }
}