post https://api.twelvelabs.io/v1.2/embed-new
This method creates embedings for text, image, and audio.
You can create multiple types of embeddings in a single API call.
Before you create an embedding, ensure that the following prerequisites are met:
Common parameters:
For all types of embeddings, set the following parameter::
engine_name
: Specify the name of the video understanding engine you want to use. Example: "Marengo-retrieval-2.6".
Text embeddings:
To create an embedding for text, provide these parameters:
text
: The text for which to create an embedding.- (Optional)
text_truncate
: Specify how to truncate text that exceeds 77 tokens.
Image embeddings:
To create an embedding for an image, provide the image by using one of these parameters:
image_url
: A publicly accessible URL of your image file.image_file
: A local image file.
NOTE: If you specify both theimage_url
andimage_file
parameters in the same request, theimage_url
parameter takes precedence.
Audio embeddings:
To create an embedding for an audio file, provide the audio file using one of the following parameters:
audio_url
: A publicly accessible URL of your audio file.audio_file
: A local audio file.- (Optional)
audio_truncate
: Specify how to truncate the embeddings for audio files that exceed 10 seconds.
NOTE: If you specify both theaudio_url
andaudio_file
parameters in the same request, theaudio_url
parameter takes precedence overaudio_file
.