Skip to main content
POST
/
api
/
v2
/
embeddings
Create embeddings
curl --request POST \
  --url https://paradigm.lighton.ai/api/v2/embeddings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "input": "<string>",
  "encoding_format": "float",
  "dimensions": 123,
  "user": "<string>"
}
'
{
"model": "multilingual-e5-large",
"input": "Hello, world!"
}

Authorizations

Authorization
string
header
required

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

Body

Request serializer for embeddings endpoint (OpenAI-compatible).

model
string
required

Model to use for generating embeddings, must exist and be configured from the admin

input
string
required

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

encoding_format
enum<string>
default:float

The format to return the embeddings in

  • float - float
  • base64 - base64
Available options:
float,
base64
dimensions
integer

The number of dimensions the resulting output embeddings should have

user
string

A unique identifier representing your end-user

Response

200 - application/json

Response serializer for embeddings endpoint results.

data
object[]
required

The list of embeddings generated by the model

model
string
required

The model used for generating the embeddings

object
string
default:list

The object type, which is always 'list'

usage
object

Usage statistics for the embeddings request