For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sample appsIntegrationsDiscordPlaygroundDevEx repo
GuidesSDK ReferenceAPI Reference
GuidesSDK ReferenceAPI Reference
  • TwelveLabs API
    • Introduction
    • Authentication
  • API Reference
    • Manage indexes
    • Upload content
    • Index content
    • Manage videos
    • Manage entities
    • Any-to-video search
    • Create embeddings v2
    • Create embeddings v1
      • Create video embeddings
        • The video embedding object
        • POSTCreate a video embedding task
        • GETList video embedding tasks
        • GETRetrieve the status of a video embedding task
        • GETRetrieve video embeddings
      • Create text, image, and audio embeddings
    • Analyze and segment videos
    • Error codes
LogoLogo
Sample appsIntegrationsDiscordPlaygroundDevEx repo
API ReferenceCreate embeddings v1Create video embeddings

The video embedding object

Was this page helpful?
Previous

Create a video embedding task

Next
Built with

The video embedding object has the following fields:

  • segments: An array of objects containing the embeddings for each video segment and the associated information. Each object contains the following fields:
    • start_offset_time: The start time of the video segment for this embedding. If the embedding scope is video, this field equals 0.
    • end_offset_time: The end time of the video segment for this embedding. If the embedding scope is video, this field equals the duration of the video.
    • embedding_scope: Indicates the scope of the embeddings. It can take the following values:
      • video: The platform has generated an embedding for the entire video.
      • clip: The platform generated embeddings for a specific segment.
    • float: An array of floating point numbers representing an embedding. This array has 512 dimensions, and you can use it with cosine similarity for various downstream tasks.
  • metadata: An object containing metadata about the video. This object contains the following fields:
    • input_filename: The name of the video file. The platform returns this field when you upload a video from your local file system.
    • input_url: The URL of the video. The platform returns this field when you upload a video from a publicly accessible URL.
    • video_clip_length: The duration for each clip in seconds, as specified by the video_clip_length parameter of the POST method of the /embed/task endpoint. Note that the platform automatically truncates video segments shorter than 2 seconds. For a 31-second video divided into 6-second segments, the final 1-second segment will be truncated. This truncation only applies to the last segment if it does not meet the minimum length requirement of 2 seconds.
    • video_embedding_scope: The scope of the video embedding. It can take one of the following values: ['clip'] or ['clip', 'video].
    • duration: The total duration of the video in seconds.