This guide shows how you can create text embeddings using the Marengo video understanding model. For a list of available versions, complete specifications and input requirements for each version, see the Marengo page.
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.
For details on how your usage is measured and billed, see the Pricing page.
This section explains the key concepts and terminology used in this guide:
This guide shows how to create text embeddings by passing text directly to the platform. The platform returns your embeddings immediately in the response.
Use these embeddings for similarity search, content classification, clustering, recommendations, or Retrieval-Augmented Generation (RAG).
To use the platform, you need an API key:
Depending on the programming language you are using, install the TwelveLabs SDK by entering one of the following commands:
Copy and paste the code below, replacing the placeholders surrounded by <> with your values.
Create a client instance to interact with the TwelveLabs Video Understanding Platform.
Function call: You call the constructor of the TwelveLabs class.
Parameters:
api_key: The API key to authenticate your requests to the platform.Return value: An object of type TwelveLabs configured for making API calls.
Function call: You call the embed.v_2.create function.
Parameters:
input_type: The type of content. Set this parameter to text.model_name: The model you want to use. This example uses marengo3.0.text: A TextInputRequest object containing the following properties:
input_text: The text for which you wish to create an embedding.Return value: An object of type EmbeddingSuccessResponse containing a field named data, which is a list of embedding objects. Each embedding object includes the following fields:
embedding: An array of floats representing the embedding vector.embedding_option: The type of embedding generated.