Skip to main content
POST
/
inference
/
embedding
Generate embeddings for sentences
curl --request POST \
  --url https://api.example.com/inference/embedding \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "sentences": [
    "<string>"
  ]
}
'
{
  "embeddings": [
    {}
  ],
  "num_tokens": 123
}

Authorizations

Authorization
string
header
required

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

Headers

Api-key
string | null

Body

application/json
sentences
string[]
required

Response

Successful Response

embeddings
Embeddings · object[]
required
num_tokens
integer
required