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
Response headers
A comma-separated, alphabetically sorted list of the rate limits the request was measured against. Only the limits that applied to the request appear.
Each entry is a label. Replace <label> with an entry to read the values for that limit: X-Ratelimit-<label>-Limit, X-Ratelimit-<label>-Remaining, and X-Ratelimit-<label>-Reset. This list keeps the mixed-case spelling of each label, such as InputToken-Video. The platform sends the headers as X-Ratelimit-Inputtoken-Video-Limit. HTTP header names are case-insensitive, so the two spellings match.
Some accounts receive the legacy X-Ratelimit-Limit, X-Ratelimit-Remaining, X-Ratelimit-Used, and X-Ratelimit-Reset headers instead of this family. A response does not include both families. The /embed-v2, /embed-v2/tasks, and /knowledge-stores/{knowledge_store_id}/search endpoints send only this family. For details, see Legacy headers.
The maximum number of requests you can make per rate limit window for this endpoint. For details, see the Rate limits page.
The maximum duration of video and audio, in seconds, that you can process per rate limit window for this endpoint. For details, see the Rate limits page.
The maximum number of requests you can make per rate limit window for this endpoint. Some accounts receive this legacy header instead of the X-Ratelimit-Dimensions family. For details, see Legacy headers.
The number of requests remaining in the current rate limit window for the specific endpoint. Some accounts receive this legacy header instead of the X-Ratelimit-Dimensions family. For details, see Legacy headers.
The number of requests you have made in the current rate limit window for the specific endpoint. Some accounts receive this legacy header instead of the X-Ratelimit-Dimensions family. For details, see Legacy headers.
The time at which the current rate limit window resets, expressed in UTC epoch seconds. Some accounts receive this legacy header instead of the X-Ratelimit-Dimensions family. For details, see Legacy headers.