curl --request POST \
--url https://paradigm.lighton.ai/api/v3/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "alfred-4.2",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
]
}
'{
"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": "alfred-4.2",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
]
}
'{
"model": "alfred-4.2",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
]
}Authorizations
Body
Request serializer for chat completions endpoint (OpenAI-compatible).
Response
Response serializer for chat completions endpoint results.