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!"
}{
"detail": "System is under maintenance.",
"error": "service_maintenance",
"mode": "full_shutdown",
"reason": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"endpoint_category_names": [
"<string>"
]
}Create embeddings
This endpoint can be used to convert text chunks into embeddings.
It is a simple proxy forwarding your requests to the desired model.
Model resolution:
The model field accepts either a model technical name or an alias technical name. If the value matches an alias technical name for the authenticated user’s company, the alias routing is used to resolve the effective model (even if a model with the same technical name exists). Otherwise, the model is resolved directly by technical name.
Input Format:
input: Text string to convert to embeddingsencoding_format: Format for returned embeddings (float or base64)dimensions: Optional dimension specification for output 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!"
}{
"detail": "System is under maintenance.",
"error": "service_maintenance",
"mode": "full_shutdown",
"reason": "<string>",
"started_at": "2023-11-07T05:31:56Z",
"endpoint_category_names": [
"<string>"
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Request serializer for embeddings endpoint (OpenAI-compatible).
Model to use for generating embeddings, must exist and be configured from the admin
Input text to embed, encoded as a string or array of tokens
The format to return the embeddings in
float- floatbase64- base64
float, base64 The number of dimensions the resulting output embeddings should have
A unique identifier representing your end-user
Response
Response serializer for embeddings endpoint results.