Analysis API
API endpoints and SDK methods for video analysis
Analysis API
The Analysis API provides detailed information about the analysis process and results. This page documents both the REST API endpoints and the corresponding SDK methods.
Analysis Process
The NomadicML analysis process involves several stages:
- Video Processing: The video is prepared for analysis (decoding, frame extraction)
- Object Detection: AI models identify and track objects in the video
- Event Detection: The system identifies significant driving events
- Context Analysis: Each event is analyzed in context
- Report Generation: A comprehensive analysis is compiled
The API provides access to the results of this process and allows you to control certain aspects of the analysis.
Get Analysis Status
Check the current status of a video’s analysis.
SDK Method
HTTP Request
Headers:
Query Parameters:
firebase_collection_name
(string, required): Collection name (default: “videos”)
Response:
Get Full Analysis
Retrieve the complete analysis for a video.
SDK Method
HTTP Request
Headers:
Query Parameters:
firebase_collection_name
(string, required): Collection name (default: “videos”)
Response:
Get Analysis Summary
Get a condensed summary of the video analysis.
SDK Method
There is no direct SDK method for this specific endpoint. Use get_video_analysis()
and extract the summary information.
HTTP Request
Headers:
Query Parameters:
firebase_collection_name
(string, required): Collection name (default: “videos”)
Response:
Get Video Metadata
Retrieve just the metadata of a video.
SDK Method
There is no direct SDK method for this specific endpoint. Use get_video_status()
and extract the metadata.
HTTP Request
Headers:
Query Parameters:
firebase_collection_name
(string, required): Collection name (default: “videos”)
Response:
Analysis Settings
Control settings for video analysis.
SDK Method
Currently, the SDK does not provide a direct method for updating analysis settings. These must be specified during the upload or analysis request.
HTTP Request
Headers:
Request Body:
Response:
Stop Analysis
Stop an ongoing analysis process.
SDK Method
HTTP Request
Headers:
Form Parameters:
video_id
(string, required): ID of the video to stop analyzing
Response:
Get Analysis Metrics
Retrieve detailed metrics from the video analysis.
SDK Method
There is no direct SDK method for this specific endpoint. Use get_video_analysis()
and extract the metrics information.
HTTP Request
Headers:
Query Parameters:
firebase_collection_name
(string, required): Collection name (default: “videos”)
Response:
Compare Analysis
Compare the analysis results of two videos.
SDK Method
There is no direct SDK method for this endpoint, but you can implement comparison logic by retrieving analyses for multiple videos and comparing them programmatically.
HTTP Request
Headers:
Query Parameters:
video_id_1
(string, required): ID of the first videovideo_id_2
(string, required): ID of the second videofirebase_collection_name
(string, required): Collection name (default: “videos”)
Response:
Analysis Reports
Generate a formatted report of video analysis.
SDK Method
There is no direct SDK method for this endpoint.
HTTP Request
Headers:
Query Parameters:
firebase_collection_name
(string, required): Collection name (default: “videos”)format
(string, optional): Report format (“pdf”, “html”, “json”, default: “pdf”)include_thumbnails
(boolean, optional): Include event thumbnails (default: true)include_recommendations
(boolean, optional): Include recommendations (default: true)
Response: For PDF/HTML formats, a binary file is returned with the appropriate content type. For JSON format, a structured report is returned:
Error Handling
The Analysis API returns the same error structure as the Video API:
Common error codes specific to the Analysis API:
analysis_not_found
: The requested analysis doesn’t existanalysis_in_progress
: Analysis is still in progressanalysis_failed
: Analysis failed to completeinvalid_analysis_parameters
: Invalid analysis parameters provided