Create text, image, and audio embeddings
The SDK provides methods to create text, image, and audio embeddings.
Create text, image, and audio embeddings
Description: This method creates a new embedding.
Note that you must specify at least the following parameters:
- 
model_name: The name of the video understanding model to use.
- 
One or more of the following input types: - text: For text embeddings
- audio_urlor- audio_file: For audio embeddings. If you specify both, the- audio_urlparameter takes precedence.
- image_urlor- image_file: For image embeddings. If you specify both, the- image_urlparameter takes precedence.
 
You must provide at least one input type, but you can include multiple types in a single function call.
Function signature and example:
Parameters:
Return value: Returns an EmbeddingResponse object containing the embedding results.
The EmbeddingResponse class contains the following properties:
The TextEmbeddingResult class contains the following properties:
The AudioEmbeddingResult class contains the following properties:
The ImageEmbeddingResult class contains the following properties:
The BaseSegment class contains the following properties:
The AudioSegment class extends BaseSegment and contains the following additional properties:
The BaseEmbeddingMetadata class contains the following properties:
API Reference: Create text, audio, and image embeddings.
Related guides:
Error codes
This section lists the most common error messages you may encounter while creating text, image, and audio embeddings.
- parameter_invalid- The textparameter is invalid. The text token length should be less than or equal to 77.
- The text_truncateparameter is invalid. You should use one of the following values:none,start,end.
 
- The