Skip to main content
POST
/
v1
/
embeddings
Create embeddings
curl --request POST \
  --url https://api.tokenfactory.nebius.com/v1/embeddings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "model": "<string>",
  "input": "What's a nice vector, Victor?",
  "encoding_format": "float",
  "user": "<string>",
  "service_tier": "auto",
  "dimensions": 4096
}
EOF
{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "embedding": [
        0.0023064255,
        -0.009327292,
        -0.0028842222
      ],
      "index": 0
    }
  ],
  "model": "BAAI/bge-en-icl",
  "usage": {
    "prompt_tokens": 8,
    "total_tokens": 8
  }
}

Authorizations

Authorization
string
header
required

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

Query Parameters

ai_project_id
string | null

current project ID

Body

application/json
model
string
required

ID of the model to use.

Example:

"BAAI/bge-en-icl"

input
required

Input text to embed, encoded as a string or array of tokens.

Example:

"What's a nice vector, Victor?"

encoding_format
string | null
default:float

The format to return the embeddings in. Can be either float or base64.

user
string | null

A unique identifier representing your end-user.

service_tier
enum<string> | null
default:auto

The service tier to use for the request.

Available options:
auto,
default,
over-limit,
flex,
no-limit
Example:

"auto"

dimensions
integer | null

The dimensions to use for the request.

Example:

4096

Response

OK

object
string
required

always 'list'.

model
string
required

The model used for the embedding.

usage
Usage · object
required

Token usage stats.

data
Embedding · object[]
required

List of Embedding objects

service_tier
enum<string>
required

The service tier used for the request.

Available options:
auto,
default,
over-limit,
flex,
no-limit