Skip to main content

Embed a text with an embedding model

POST 

/embedding-models/:embedding_model_id/query

Converts one text into a vector with the embedding model and returns the vector. Client applications use this operation to test an embedding model. The vector has size numbers, one for each dimension of the embedding model. Foundation4 embeds the text as given, with no prefix or instruction. The first request for an embedding model on each API server instance loads the model.

Permissions. Read and execute on the embedding model.

Request​

Responses​

The text was converted. The body is a JSON array of numbers whose length equals the size of the embedding model.