Nara Lens/Docs

POST /api/vad/analyze

Submit a video for Active Speaker Detection analysis.

POST/api/vad/analyze

Submit a video URL for asynchronous speaker detection analysis. Returns a task_id for polling results.

Headers

AuthorizationstringRequired

Bearer token with your API key (e.g., 'Bearer sk-...')

Content-TypestringRequired

application/json

Request Body

video_urlstringRequired

Public URL to the video file (MP4, WebM, etc.)

Example Request

Bash
# Submit video for analysis
curl -X POST https://naralens.com/api/vad/analyze \
  -H "Authorization: Bearer $NARA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"video_url": "https://example.com/video.mp4"}'

# Response: {"task_id": "abc123", "status": "pending"}

Response

200Video submitted successfully
{
  "task_id": "fc-abc123xyz",
  "status": "pending",
  "message": "Video submitted for analysis. Poll /api/vad/result/{task_id} for results."
}

Error Responses

400Missing video_url
{"error": "Missing required field: video_url"}
401Invalid or missing API key
{"error": "Invalid API key"}
502CV service unavailable
{"error": "Failed to connect to CV service"}

Next Step

After submitting, use the task_id to poll GET /api/vad/result/{taskId} for results.