Skip to main content
POST
/
api
/
v2
/
chat
/
completions
curl --request POST \
--url https://paradigm.lighton.ai/api/v2/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "alfred-40b-1123",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
]
}'
{
"model": "alfred-40b-1123",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "Hello!"
}
]
}

Authorizations

Authorization
string
header
required

Bearer token authentication

Body

Request serializer for chat completions endpoint.

model
string
required

Model to use for generating chat completions, must exist and be configured from the admin

messages
object[]
required

List of messages comprising the conversation so far

max_tokens
integer

Maximum number of tokens to generate

temperature
number

Sampling temperature between 0 and 2

top_p
number

Nucleus sampling parameter

n
integer

Number of chat completion choices to generate

stream
boolean

Whether to stream back partial progress

stop
string[]

Up to 4 sequences where the API will stop generating further tokens

presence_penalty
number

Penalty for new tokens based on whether they appear in the text so far

frequency_penalty
number

Penalty for new tokens based on their existing frequency in the text

logit_bias
object

Modify the likelihood of specified tokens appearing in the completion

user
string

A unique identifier representing your end-user

functions
object[]

List of functions the model may call

function_call
string

Controls how the model responds to function calls

Response

Successful response

Response serializer for chat completions endpoint results.

id
string
required

Unique identifier for the chat completion

object
string
required

Object type, always 'chat.completion'

created
integer
required

Unix timestamp of when the chat completion was created

model
string
required

The model used for generating the chat completion

choices
object[]
required

List of chat completion choices generated by the model

I