Skip to main content
POST
/
api
/
v3
/
embeddings
Create embeddings
curl --request POST \
  --url https://paradigm.lighton.ai/api/v3/embeddings \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "<string>",
  "input": "<string>"
}
'
import requests

url = "https://paradigm.lighton.ai/api/v3/embeddings"

payload = {
"model": "<string>",
"input": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({model: '<string>', input: '<string>'})
};

fetch('https://paradigm.lighton.ai/api/v3/embeddings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
  "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