Nara Lens/Docs

GET /api/vad/result/{taskId}

Get the results of a video analysis task.

GET/api/vad/result/{taskId}

Poll for the results of a previously submitted video analysis task. Returns processing status or completed results with frame-by-frame speaker detection data.

Headers

AuthorizationstringRequired

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

Example Request

Bash
# Poll for results
curl https://naralens.com/api/vad/result/{task_id} \
  -H "Authorization: Bearer $NARA_API_KEY"

# Response when complete:
# {
#   "task_id": "abc123",
#   "status": "completed",
#   "video_duration": 30.5,
#   "frames": [{"frame": 0, "faces": [...], "active": true}]
# }

Processing Response

While the video is still being analyzed:

200Still processing
{
  "task_id": "fc-abc123xyz",
  "status": "processing"
}

Completed Response

When analysis is complete:

200Analysis complete
{
  "task_id": "fc-abc123xyz",
  "status": "completed",
  "video_duration": 177.27,
  "start_time": 1706000000.123,
  "end_time": 1706000045.456,
  "frames": [
    {
      "frame": 0,
      "faces": [
        {
          "bbox": [120, 80, 220, 200],
          "person_id": 1,
          "speaking_score": 0.92,
          "active": true
        },
        {
          "bbox": [350, 90, 450, 210],
          "person_id": 2,
          "speaking_score": 0.15,
          "active": false
        }
      ]
    },
    {
      "frame": 1,
      "faces": [...]
    }
  ]
}

Response Fields

FieldTypeDescription
task_idstringUnique identifier for this analysis task
statusstring"processing" or "completed"
video_durationnumberVideo length in seconds
framesarrayFrame-by-frame analysis data
frames[].framenumberFrame index (0-based)
frames[].facesarrayDetected faces in this frame
faces[].bboxarrayBounding box [x, y, width, height]
faces[].person_idnumberUnique ID tracking this person across frames
faces[].speaking_scorenumberConfidence score (0-1) that person is speaking
faces[].activebooleanWhether the person is actively speaking

Billing

Credits are charged when you first retrieve a completed result. The cost is 1 credit per second of video duration (rounded down). Subsequent requests for the same task_id do not incur additional charges.