Skip to main content
POST
/
api
/
v3
/
inference
/
embeddings
Generate Text Embeddings
curl --request POST \
  --url https://api.nugen.in/api/v3/inference/embeddings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "input": "The quick brown fox jumped over the lazy dog",
  "model": "nugen-flash-embed",
  "dimensions": 123
}
'
{
  "detail": [
    {
      "loc": [
        "<string>"
      ],
      "msg": "<string>",
      "type": "<string>"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

X-Provider
string
default:fwai

Body

application/json
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

The name of the model used to generate the embedding.

Example:

"nugen-flash-embed"

dimensions
integer | null

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

Response

Vector embeddings and usage statistics