POST /detect
Detect specific object classes in an image.
POST
/v1/detectDetect objects of specific classes in an image.
Headers
AuthorizationstringRequiredBearer token with your API key
Request Body
imagestringRequiredImage URL or base64-encoded image data
classesstring[]RequiredArray of class names to detect
min_confidencenumberMinimum 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
}