curl --request POST \
--url https://api.lighton.ai/api/v2/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!"
}
]
}Models
Generate a chat completion (V2 — deprecated)
deprecated
Deprecated — this endpoint will be removed in a future release. Use POST /api/v3/chat/completions instead.
This endpoint is an alias for the V3 chat completions endpoint, exposed at /api/v2/chat/completions for backward compatibility.
POST
/
api
/
v2
/
chat
/
completions
curl --request POST \
--url https://api.lighton.ai/api/v2/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
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Request serializer for chat completions endpoint (OpenAI-compatible).
Response
200 - application/json
Response serializer for chat completions endpoint results.