curl --request POST \
--url https://paradigm.lighton.ai/api/v3/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"messages": [
{
"content": "<string>",
"name": "<string>",
"function_call": {}
}
]
}
'import requests
url = "https://paradigm.lighton.ai/api/v3/chat/completions"
payload = {
"model": "<string>",
"messages": [
{
"content": "<string>",
"name": "<string>",
"function_call": {}
}
]
}
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>',
messages: [{content: '<string>', name: '<string>', function_call: {}}]
})
};
fetch('https://paradigm.lighton.ai/api/v3/chat/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"model": "alfred-4.2",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
]
}Generate a chat completion
This endpoint can be used to generate chat completions from a Large Language Model.
It is a simple proxy forwarding your requests to the desired model.
Any LightOn model is deployed on a vLLM-based image.
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.
Response Types:
- When
stream=false(default): Returns a complete JSON response with all completion choices - When
stream=true: Returns Server-Sent Events (SSE) with incremental completion chunks
Streaming Format:
Each SSE event contains a JSON object with incremental text. The stream ends with data: [DONE].
curl --request POST \
--url https://paradigm.lighton.ai/api/v3/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"messages": [
{
"content": "<string>",
"name": "<string>",
"function_call": {}
}
]
}
'import requests
url = "https://paradigm.lighton.ai/api/v3/chat/completions"
payload = {
"model": "<string>",
"messages": [
{
"content": "<string>",
"name": "<string>",
"function_call": {}
}
]
}
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>',
messages: [{content: '<string>', name: '<string>', function_call: {}}]
})
};
fetch('https://paradigm.lighton.ai/api/v3/chat/completions', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"model": "alfred-4.2",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Request serializer for chat completions endpoint (OpenAI-compatible).
Model to use for generating chat completions, must exist and be configured from the admin
List of messages comprising the conversation so far
Show child attributes
Show child attributes
Maximum number of tokens to generate
Sampling temperature between 0 and 2
Nucleus sampling parameter
Number of chat completion choices to generate
Whether to stream back partial progress
Up to 4 sequences where the API will stop generating further tokens
Penalty for new tokens based on whether they appear in the text so far
Penalty for new tokens based on their existing frequency in the text
Modify the likelihood of specified tokens appearing in the completion
Show child attributes
Show child attributes
A unique identifier representing your end-user
List of functions the model may call
Show child attributes
Show child attributes
Controls how the model responds to function calls
Response
Response serializer for chat completions endpoint results.
Unique identifier for the chat completion
Object type, always 'chat.completion'
Unix timestamp of when the chat completion was created
The model used for generating the chat completion
List of chat completion choices generated by the model
Show child attributes
Show child attributes
Usage statistics for the chat completion request
Show child attributes
Show child attributes