POST
/
embed
curl --location 'https://api.mixpeek.com/embed' \
--header 'Authorization: Bearer API_KEY' \
--header 'Content-Type: application/json' \
--data '{
    "input": "Sample text for embedding",
    "modality": "text",
    "model": "sentence-transformers/all-MiniLM-L6-v2"
}'
{
  "embedding": [
    {}
  ],
  "elapsed_time": 123
}

Request

input
string
required

The text input for which embeddings are to be generated. This can be any string of text whose semantic meaning you wish to capture in a dense vector format, enabling advanced search and analysis capabilities.

modality
string

The modality of the input data. Specifies the type of data to be processed, with “text” as the default modality.

model
string

The model used for generating embeddings. Specifies the AI model, with “sentence-transformers/all-MiniLM-L6-v2” as the default.

Response

embedding
array
required

The generated embedding for the input text. This is a dense vector representation that captures the semantic meaning of the input, allowing for similarity comparisons and enhanced search functionality.

elapsed_time
number

The time taken to generate the embedding, measured in milliseconds. Provides insight into the processing time for the embedding generation.