Create embeddings

Creates an embedding vector for each supplied text or token input.

Authentication

AuthorizationBearer
Mixlayer API key or console user session supplied as a Bearer token.

Request

Embedding parameters
inputstring or list of strings or list of integers or list of lists of integersRequired

Input to embed. Text and token inputs must be non-empty; batches are limited to 2048 items.

modelstringRequired
Embedding model identifier. Must be available to the API key and marked as an embedding model.
dimensionsinteger or nullOptional>=1
Requested output vector size. Must be greater than zero and supported by the model.
encoding_formatenumOptionalDefaults to float
input_typestring or nullOptional

Model-specific embedding input type, such as query or document.

normalizeboolean or nullOptional
Requests normalized vectors when supported by the model server.
truncateboolean or nullOptional
Requests truncation behavior when supported by the model server.
userstring or nullOptional

Opaque end-user identifier accepted for OpenAI compatibility.

Response

Embedding vectors and token usage
datalist of objects
Embedding objects, one for each supplied input.
modelstring
Model used to create the embeddings.
objectenum

Object type, always list.

usageobject
Token usage for the request.

Errors

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
403
Forbidden Error
429
Too Many Requests Error
500
Internal Server Error