Skip to content

Change the embedding model

POST
/api/v1/embeddings
curl --request POST \
--url http://localhost:11044/api/v1/embeddings \
--header 'Content-Type: application/json' \
--header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>' \
--data '{ "model": "example" }'

RE-EMBEDS EVERYTHING. Vector indexes are created at a model’s own dimensions, so a different model means every stored vector is wrong until it is recomputed — this drops the indexes, walks each store, re-embeds, and rebuilds them at the new width, restoring the previous model if any of that fails. Setting the first model on an appliance that has none is the cheap case: there is nothing to re-embed yet.

model names the embedding model to switch to, or a role that resolves to one such as hosted; trimmed, and 400 when blank or when nothing here resolves it. Naming the model already in use changes nothing and answers unchanged; any other model drops and rebuilds every vector index and re-embeds every store

Media typeapplication/json

The embedding model to switch to, taken by POST /embeddings. Switching re-embeds every stored vector

object
model
required

Name of an embedding model available on this appliance, or a role that resolves to one (e.g. hosted). Trimmed; blank is refused with 400

string

Example generated

{
"model": "example"
}

Changed

Media type*/*
object

No model named, or no such model here — just the reason; or the change failed and was rolled back — the reason and the state now in force

Media type*/*
One of:

An embedding model change that was refused before anything was touched

object
error
required

Why: no model named, no such model here, or a reindex already running

string

A reindex is already running

Media type*/*

An embedding model change that was refused before anything was touched

object
error
required

Why: no model named, no such model here, or a reindex already running

string