Skip to main content

Create an embedding model

POST 

/embedding-models

Creates an embedding model: a configured instance of an embedding provider, with a model name and provider parameters. Before storing the embedding model, Foundation4 embeds a test string with the provider, so the request fails when the provider cannot load the model. A size of 0 stores the measured number of dimensions, and a nonzero size must equal the measured number. After creation, only name and description can change.

Permissions. Write on the embedding-models object type and write on the embedding provider that provider names.

Embedding models and text splitters shows example requests, and Providers and models lists the models and parameters of each provider.

Request​

Responses​

The embedding model was created. The body is the new embedding model, with size set to the measured number of dimensions.