OpenAI-compatible

Embeddings

Use the Privatemode embeddings API to convert text into multidimensional text embeddings. The API is compatible with the OpenAI Embeddings API. To create embeddings, send your requests to the Privatemode proxy. Embedding requests and responses are encrypted, both in transit and during processing.

POST/v1/embeddings

Request body

inputstring or list of stringsrequired

The texts for which you want embeddings. Pass a list of strings to embed multiple texts in one request. The maximum length of each input depends on the model. Note: Input formatting varies by model: documents are typically embedded as-is, while queries should be prefixed with task instructions. Check the models overview for the model-specific input requirements, and see the examples for proper query formatting.

modelstringrequired

The name of the embedding model, e.g., qwen3-embedding-4b.

dimensionsint

The number of dimensions of the output embedding vector. If not specified, the model's default is used. Note: It depends on the embedding model whether a different value than the default is supported.

encoding_formatstringdefault: float

Set to "float" for a list of float values or "base64" for base64 encoded values.

Returns

Returns an embeddings response object compatible with OpenAI's Embeddings API.

idstring

A unique identifier for the request.

createdinteger

The Unix timestamp (in seconds) of when the response was created. Note: id and created aren't part of the OpenAI API spec.

datalist

The embeddings for the provided inputs.

Show properties

indexinteger

The index of the corresponding input.

objectstring

Always "embedding".

embeddingarray

The embedding vector.

objectstring

Always "list".

modelstring

The model used.

usageobject

Token usage statistics.

Show properties

prompt_tokensinteger

The number of tokens in the input.

total_tokensinteger

The total number of tokens.