This method of uploading videos will be deprecated in a future version. New implementations should use direct uploads or multipart uploads followed by separate indexing.
A video indexing task represents a request to upload and index a video. The TasksWrapper class provides methods to manage your video indexing tasks.
Description: This method creates a new video indexing task that uploads and indexes a video.
Your video files must meet the format requirements based on the models enabled for your index:
This method is rate-limited. For details, see the Rate limits page.
Function signature and example:
The TasksCreateRequest interface defines the parameters for creating a new video indexing task:
Returns a Promise that resolves to a TasksCreateResponse instance.
The TasksCreateResponse interface contains the following properties:
Description: This method retrieves the details of a specific video indexing task.
Function signature and example:
Returns a Promise that resolves to a TasksRetrieveResponse instance representing the retrieved video indexing task..
The TasksRetrieveResponse interface extends VideoIndexingTask and contains the following properties:
The VideoIndexingTaskSystemMetadata interface contains the following properties:
The HlsObject interface contains the following properties:
Retrieve a video indexing task.
Description: This method waits until a video indexing task is completed. It checks the task status at regular intervals by retrieving its details. If you provide a callback function, the method calls it after each status check with the current task object. This allows you to monitor the progress of the task.
A Promise that resolves to a TasksRetrieveResponse representing the completed task. See the Retrieve a video indexing task section above for complete property details.
Description: This method returns a paginated list of the video indexing tasks in your account based on the provided parameters. By default, the platform returns your video indexing tasks sorted by creation date, with the newest at the top of the list.
Function signature and example:
The TasksListRequest interface defines the parameters for listing video indexing tasks:
Returns a Promise that resolves to a Page<VideoIndexingTask> object that implements AsyncIterable, allowing you to iterate through the results.
The VideoIndexingTask interface contains the following properties:
The VideoIndexingTaskSystemMetadata interface contains the following properties:
Description: This method deletes an existing video indexing task. This action cannot be undone. You can only delete video indexing tasks for which the status is ready or failed. If the status of your video indexing task is ready, you must first delete the video vector associated with your video indexing task.
Function signature and example:
Returns a Promise that resolves to void. This method doesn’t return any data upon successful completion.
This section lists the most common error messages you may encounter while uploading videos.
video_resolution_too_low
{current_resolution}.video_resolution_too_high
{current_resolution}.video_resolution_invalid_aspect_ratio
{current_resolution}.video_file_broken
task_cannot_be_deleted
usage_limit_exceeded
video_filesize_too_large
{maximum_size}. The current size is {current_file_size}.video_duration_too_short
video_duration_too_long
Note that the minimum and maximum durations depend on the models enabled for your index. For details, see the input requirements of each model on the Marengo and Pegasus pages. If both models are enabled, the most restrictive requirements apply.
For a list of general errors that apply to all endpoints, see the Error codes page.