Create embeddings for text, image, and audio

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 the image_url and image_file parameters in the same request, the image_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 the audio_url and audio_file parameters in the same request, the audio_url parameter takes precedence over audio_file.
Language
Click Try It! to start a request and see the response here!