Chat Completions

Create Chat Completion

post
/chat/completions

Create a chat completion with OpenAI-compatible format

Authorizations
AuthorizationstringRequired

Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)

Body
workspacestringOptionalDefault: default
modelstringOptionalDefault: activeloop-l0
temperatureany ofOptionalDefault: 1
numberOptional
or
nullOptional
top_pany ofOptionalDefault: 1
numberOptional
or
nullOptional
nany ofOptionalDefault: 1
integerOptional
or
nullOptional
streamany ofOptionalDefault: false
booleanOptional
or
nullOptional
max_tokensany ofOptional
integerOptional
or
nullOptional
max_completion_tokensany ofOptional
integerOptional
or
nullOptional
presence_penaltyany ofOptionalDefault: 0
numberOptional
or
nullOptional
frequency_penaltyany ofOptionalDefault: 0
numberOptional
or
nullOptional
logit_biasany ofOptional
or
nullOptional
logprobsany ofOptionalDefault: false
booleanOptional
or
nullOptional
top_logprobsany ofOptional
integerOptional
or
nullOptional
stopany ofOptional
stringOptional
or
string[]Optional
or
nullOptional
seedany ofOptional
integerOptional
or
nullOptional
response_formatany ofOptional
or
nullOptional
userany ofOptional
stringOptional
or
nullOptional
stream_optionsany ofOptional
or
nullOptional
storeany ofOptionalDefault: false
booleanOptional
or
nullOptional
metadataany ofOptional
or
nullOptional
modalitiesany ofOptional
string[]Optional
or
nullOptional
service_tierany ofOptional
stringOptional
or
nullOptional
reasoning_effortany ofOptional
string ยท enumOptionalPossible values:
or
nullOptional
Responses
200

Successful Response

application/json
Responseany
post
/chat/completions

No content

Get Chat Completion Messages

get
/chat/completions/{completion_id}/messages

Get messages for a chat completion

Authorizations
AuthorizationstringRequired

Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)

Path parameters
completion_idstringRequired

The ID of the chat completion

Query parameters
workspacestringOptional

The ID of workspace to lookup chat completion messages in

Default: default
afterany ofOptional

Identifier for the last message from the previous pagination request

stringOptional
or
nullOptional
limitinteger ยท min: 1 ยท max: 100Optional

Number of messages to retrieve

Default: 20
orderstringOptional

Sort order for messages by timestamp

Default: asc
Responses
200

Successful Response

application/json
get
/chat/completions/{completion_id}/messages

List Completions

get
/chat/completions

List stored Chat Completions

Authorizations
AuthorizationstringRequired

Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)

Query parameters
workspacestringOptional

The ID of workspace to lookup chat completions in

Default: default
afterany ofOptional

Identifier for the last chat completion from the previous pagination request

stringOptional
or
nullOptional
limitinteger ยท min: 1 ยท max: 100Optional

Number of Chat Completions to retrieve

Default: 20
orderstring ยท enumOptional

Sort order for Chat Completions by timestamp

Default: ascPossible values:
modelany ofOptional

Filter by model

stringOptional
or
nullOptional
Responses
200

Successful Response

application/json
get
/chat/completions

Get Chat Completion

get
/chat/completions/{completion_id}

Get a stored chat completion

Authorizations
AuthorizationstringRequired

Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)

Path parameters
completion_idstringRequired

The ID of the chat completion to retrieve

Query parameters
workspacestringOptional

The ID of workspace to lookup chat completion in

Default: default
Responses
200

Successful Response

application/json
get
/chat/completions/{completion_id}

Update Chat Completion

post
/chat/completions/{completion_id}

Update metadata for a chat completion

Authorizations
AuthorizationstringRequired

Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)

Path parameters
completion_idstringRequired

The ID of the chat completion to update

Query parameters
workspacestringOptional

The ID of workspace to update chat completion in

Default: default
Body
Other propertiesstringOptional
Responses
200

Successful Response

application/json
post
/chat/completions/{completion_id}

Get Chat Completion Messages

get
/chat/completions/{completion_id}/messages

Get messages for a chat completion

Authorizations
AuthorizationstringRequired

Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)

Path parameters
completion_idstringRequired

The ID of the chat completion

Query parameters
workspacestringOptional

The ID of workspace to lookup chat completion messages in

Default: default
afterany ofOptional

Identifier for the last message from the previous pagination request

stringOptional
or
nullOptional
limitinteger ยท min: 1 ยท max: 100Optional

Number of messages to retrieve

Default: 20
orderstringOptional

Sort order for messages by timestamp

Default: asc
Responses
200

Successful Response

application/json
get
/chat/completions/{completion_id}/messages

Delete Chat Completion

delete
/chat/completions/{completion_id}

Delete a chat completion

Authorizations
AuthorizationstringRequired

Enter your bearer token in the format 'your-token' (without quotes or 'Bearer' prefix)

Path parameters
completion_idstringRequired

The ID of the chat completion to delete

Query parameters
workspacestringOptional

The ID of workspace to delete chat completion in

Default: default
Responses
200

Successful Response

application/json
delete
/chat/completions/{completion_id}

Last updated