Create a video embedding task
This endpoint will be deprecated in a future version. Migrate to the Embed API v2 for continued support and access to new features.
This method creates a new video embedding task that uploads a video to the platform and creates one or multiple video embeddings.
This endpoint is rate-limited. For details, see the Rate limits page.
Upload options:
- Local file: Use the
video_fileparameter - Publicly accessible URL: Use the
video_urlparameter.
Specify at least one option. If both are provided, video_url takes precedence.
Your videos must meet the requirements. This endpoint allows you to upload files up to 2 GB in size. To upload larger files, use the Multipart Upload API
- The Marengo 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.
Authentication
Your API key.
You can find your API key on the API Keys page.
Request
The name of the model you want to use. The following models are available:
marengo3.0: Enhanced model with sports intelligence and extended content support.
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_lengthseconds, fromvideo_start_offset_sectovideo_end_offset_sec.clipandvideo: Creates embeddings for video segments and the entire video. Use thevideoscope for videos up to 10-30 seconds to maintain optimal performance.
To create embeddings for segments and the entire video in the same request, include this parameter twice as shown below:
--form video_embedding_scope=clip \
--form video_embedding_scope=video
Default: clip