Create a video embedding task
This method creates a new video embedding task that uploads a video to the platform and creates one or multiple video embeddings.
Ensure your video meets the requirements in the Prerequisites section of the Create video embeddings page.
Upload options:
- Local file: Use the
video_file
parameter - Publicly accessible URL: Use the
video_url
parameter.
Specify at least one option. If both are provided, video_url
takes precedence.
Notes
- The “Marengo-retrieval-2.7” video understanding model generates embeddings for all modalities in the same latent space. This shared space enables any-to-any searches across different types of content.
- Video embeddings are stored for seven days.
- The platform supports uploading video files that can play without additional user interaction or custom video players. Ensure your URL points to the raw video file, not a web page containing the video. Links to third-party hosting sites, cloud storage services, or videos requiring extra steps to play are not supported.
Headers
Request
The name of the model you want to use. The following models are available:
Marengo-retrieval-2.7
Specify this parameter to upload a video from a publicly accessible URL.
The start offset in seconds from the beginning of the video where processing should begin. Specifying 0 means starting from the beginning of the video.
Default: 0 Min: 0 Max: Duration of the video minus video_clip_length
The end offset in seconds from the beginning of the video where processing should stop.
Ensure the following when you specify this parameter:
- The end offset does not exceed the total duration of the video file.
- The end offset is greater than the start offset.
- You must set both the start and end offsets. Setting only one of these offsets is not permitted, resulting in an error.
Min: video_start_offset + video_clip_length Max: Duration of the video file
The desired duration in seconds for each clip for which the platform generates an embedding. Ensure that the clip length does not exceed the interval between the start and end offsets.
Default: 6 Min: 2 Max: 10
Defines the scope of video embedding generation. Valid values are the following:
clip
: Creates embeddings for each video segment ofvideo_clip_length
seconds, fromvideo_start_offset_sec
tovideo_end_offset_sec
.clip
andvideo
: Creates embeddings for video segments and the entire video.
To create embeddings for segments and the entire video in the same request, include this parameter twice as shown below:
Default: clip
Response
A video embedding task has successfully been created.