Skip to main content
POST
/
v1
/
embeddings
Create embedding
curl --request POST \
  --url https://api.vivgrid.com/v1/embeddings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "BAAI/bge-m3",
  "input": "The quick brown fox jumped over the lazy dog",
  "encoding_format": "float"
}
'
{
  "object": "list",
  "data": [
    {
      "object": "embedding",
      "index": 0,
      "embedding": [
        0.0139,
        -0.0021,
        0.0012
      ]
    }
  ],
  "model": "BAAI/bge-m3",
  "usage": {
    "prompt_tokens": 9,
    "total_tokens": 9
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
model
string
required

BAAI/bge-m3.

input
required

Input text or tokens to embed.

encoding_format
enum<string>
default:float

Format of the returned embedding.

Available options:
float,
base64
dimensions
integer

Optional number of dimensions for the embedding vector.

Required range: x >= 1
user
string

Unique identifier for the end-user.

Response

Embedding response

data
object[]
required
model
string
required
object
string
usage
object