Nara Lens/Docs

POST /detect

Detect specific object classes in an image.

POST/v1/detect

Detect objects of specific classes in an image.

Headers

AuthorizationstringRequired

Bearer token with your API key

Request Body

imagestringRequired

Image URL or base64-encoded image data

classesstring[]Required

Array of class names to detect

min_confidencenumber

Minimum confidence threshold (0-1, default: 0.5)

Example Request

Bash
curl -X POST https://api.naralens.com/v1/detect \
  -H "Authorization: Bearer $NARA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "https://example.com/street.jpg",
    "classes": ["car", "truck", "person", "bicycle"]
  }'

Response

200Successful detection
{
  "id": "req_def456",
  "detections": [
    {
      "label": "car",
      "confidence": 0.96,
      "bbox": [120, 200, 380, 340]
    },
    {
      "label": "person",
      "confidence": 0.89,
      "bbox": [450, 150, 520, 380]
    }
  ],
  "processing_time_ms": 89
}