POST /analyze
Analyze an image using a programmable perception.
POST
/v1/analyzeAnalyze an image using a programmable perception query.
Headers
AuthorizationstringRequiredBearer token with your API key
Content-TypestringRequiredapplication/json
Request Body
imagestringRequiredImage URL or base64-encoded image data
perceptionstringRequiredPerception query (e.g., 'detect:person,vehicle')
optionsobjectAdditional configuration options
Example Request
Bash
curl -X POST https://api.naralens.com/v1/analyze \
-H "Authorization: Bearer $NARA_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"image": "https://example.com/image.jpg",
"perception": "detect:person,vehicle"
}'Response
200Successful analysis
{
"id": "req_abc123xyz",
"objects": [
{
"label": "person",
"confidence": 0.98,
"bbox": [100, 150, 200, 400],
"attributes": {}
}
],
"processing_time_ms": 127,
"model_version": "v2.1"
}