Skip to main content
POST
Generate Embeddings

Authorizations

Authorization
string
header
required

Your Nugen API key, sent as a Bearer token

Body

application/json

An embeddings request in the OpenAI format.

input
required

Input text to embed, encoded as a string or a list of strings. To embed multiple inputs in a single request, pass a list of strings. The input must not exceed the max input tokens for the model, cannot be an empty string.

Example:

"The quick brown fox jumped over the lazy dog"

model
string
required

Use your aligned model id (e.g. model_01kmqm4nrn9fw6r). The same aligned id serves chat completions, completions, embeddings and reranking. Alignment shapes the model's representation space, so aligned embeddings are recommended for domain retrieval.

Example:

"model_01kmqm4nrn9fw6r"

dimensions
integer | null

(Applicable for only Resizable Matryoshka Embedding models) The number of dimensions the resulting output embeddings should have.

Response

Vector embeddings

Embedding vectors for the input, in the OpenAI format.

id
string | null
required

A unique identifier of the response.

data
EmbeddingObject · object[] | null
required

The list of embeddings generated by the model.

model
string | null
required

The name of the model used to generate the embedding.

created
number | null
required

The Unix time in seconds when the response was generated.

usage
EmbeddingUsage · object | null
required

The usage information for the request.

object
string | null
default:embedding

The object type, which is always 'embedding'.

Allowed value: "embedding"