Video API
API endpoints and SDK methods for video management
Video API
The Video API allows you to programmatically upload, manage, and process videos. This page documents both the REST API endpoints and the corresponding SDK methods.
Video Upload
Upload a new video for analysis.
SDK Method
Method Parameters
Parameter | Type | Required | Description |
---|---|---|---|
source | string | Yes | Source type: “file”, or “saved” |
file_path | string | For “file” source | Path to the local video file |
video_id | string | For “saved” source | ID of an existing video |
created_by | string | No | User identifier for tracking |
Return Value
HTTP Request
Headers:
Form Parameters:
firebase_collection_name
(string, required): Collection name for storage (default: “videos”)source
(string, required): Source type (“file”, or “saved”)file
(file, required for “file” source): The video file to uploadvideo_id
(string, required for “saved” source): ID of an existing videocreated_by
(string, optional): User identifier for tracking
Video Analysis
Start analysis for an uploaded video.
SDK Method
Method Parameters
Parameter | Type | Required | Description |
---|---|---|---|
video_id | string | Yes | ID of the video to analyze |
created_by | string | No | User identifier for tracking |
model_id | string | No | Model to use (default: “Nomadic-VL-XLarge”) |
Return Value
HTTP Request
Headers:
Form Parameters:
firebase_collection_name
(string, required): Collection name (default: “videos”)created_by
(string, optional): User identifier for trackingmodel_id
(string, optional): Model to use for analysis
Batch Analysis
Process multiple videos at once.
SDK Method
Method Parameters
Parameter | Type | Required | Description |
---|---|---|---|
video_ids | list | Yes | List of video IDs to analyze |
created_by | string | No | User identifier for tracking |
model_id | string | No | Model to use (default: “Nomadic-VL-XLarge”) |
Return Value
Upload and Analyze
Upload a video and start analysis in a single operation.
SDK Method
Method Parameters
Parameter | Type | Required | Description |
---|---|---|---|
file_path | string | Yes | Path to the video file |
wait_for_completion | boolean | No | Wait for analysis to complete (default: True) |
timeout | integer | No | Maximum wait time in seconds (default: 600) |
created_by | string | No | User identifier for tracking |
model_id | string | No | Model to use (default: “Nomadic-VL-XLarge”) |
Return Value
If wait_for_completion
is True:
If wait_for_completion
is False:
Video Status
Check the status of a video upload and analysis.
SDK Method
Method Parameters
Parameter | Type | Required | Description |
---|---|---|---|
video_id | string | Yes | ID of the video |
Return Value
HTTP Request
Headers:
Query Parameters:
firebase_collection_name
(string, required): Collection name (default: “videos”)
Wait for Analysis
Wait for video analysis to complete.
SDK Method
Method Parameters
Parameter | Type | Required | Description |
---|---|---|---|
video_id | string | Yes | ID of the video |
timeout | integer | No | Maximum wait time in seconds (default: 600) |
poll_interval | integer | No | Time between status checks in seconds (default: 5) |
Return Value
The final status object once analysis completes:
Video Analysis Results
Get the complete analysis results for a video.
SDK Method
Method Parameters
Parameter | Type | Required | Description |
---|---|---|---|
video_id | string | Yes | ID of the video |
Return Value
HTTP Request
Headers:
Query Parameters:
firebase_collection_name
(string, required): Collection name (default: “videos”)
Multiple Video Analyses
Get analysis results for multiple videos.
SDK Method
Method Parameters
Parameter | Type | Required | Description |
---|---|---|---|
video_ids | list | Yes | List of video IDs |
Return Value
Error Handling
The API returns standard HTTP status codes and the SDK raises specific exceptions:
AuthenticationError
: Invalid or missing API keyVideoUploadError
: Problems with video uploadAnalysisError
: Issues during video analysisValidationError
: Invalid input parametersAPIError
: General API errorsNomadicMLError
: Base class for all SDK errors
Example: