Chat Completions
Create a chat completion with OpenAI-compatible format
defaultactiveloop-l0111false00falsefalseSuccessful Response
Validation Error
POST /chat/completions HTTP/1.1
Host: api.activeloop.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 566
{
"workspace": "default",
"model": "activeloop-l0",
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "text"
}
]
}
],
"temperature": 1,
"top_p": 1,
"n": 1,
"stream": false,
"max_tokens": 1,
"max_completion_tokens": 1,
"presence_penalty": 0,
"frequency_penalty": 0,
"logit_bias": {
"ANY_ADDITIONAL_PROPERTY": 1
},
"logprobs": false,
"top_logprobs": 1,
"stop": "text",
"seed": 1,
"response_format": {
"type": "text"
},
"user": "text",
"stream_options": {
"include_usage": true
},
"store": false,
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"modalities": [
"text"
],
"service_tier": "text",
"reasoning_effort": "low"
}No content
Get messages for a chat completion
The ID of the chat completion
The ID of workspace to lookup chat completion messages in
defaultIdentifier for the last message from the previous pagination request
Number of messages to retrieve
20Sort order for messages by timestamp
ascSuccessful Response
Validation Error
GET /chat/completions/{completion_id}/messages HTTP/1.1
Host: api.activeloop.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "list",
"data": [
{
"id": "text",
"role": "system",
"content": "text",
"name": "text",
"content_parts": [
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
}
],
"first_id": "text",
"last_id": "text",
"has_more": false
}List stored Chat Completions
The ID of workspace to lookup chat completions in
defaultIdentifier for the last chat completion from the previous pagination request
Number of Chat Completions to retrieve
20Sort order for Chat Completions by timestamp
ascPossible values: Filter by model
Successful Response
Validation Error
GET /chat/completions HTTP/1.1
Host: api.activeloop.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "list",
"data": [
{
"id": "text",
"object": "chat.completion",
"created": 1,
"model": "text",
"system_fingerprint": "text",
"choices": [
{
"index": 1,
"message": {
"role": "system",
"content": "text",
"reasoning_content": "text",
"refusal": null,
"annotations": [
{
"type": "text",
"text": "text",
"start_index": 1,
"end_index": 1,
"file_citation": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"file_path": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
]
},
"finish_reason": "text",
"logprobs": {
"content": [
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
},
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
],
"usage": {
"prompt_tokens": 1,
"completion_tokens": 1,
"total_tokens": 1
},
"perception_usage": {
"prompt_tokens": 1,
"completion_tokens": 1,
"total_tokens": 1
},
"service_tier": "text",
"request_id": "text",
"seed": 1,
"top_p": 1,
"temperature": 1,
"presence_penalty": 1,
"frequency_penalty": 1,
"input_user": "text",
"tools": [
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"response_format": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"responses": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
],
"first_id": "text",
"last_id": "text",
"has_more": false
}Get a stored chat completion
The ID of the chat completion to retrieve
The ID of workspace to lookup chat completion in
defaultSuccessful Response
Validation Error
GET /chat/completions/{completion_id} HTTP/1.1
Host: api.activeloop.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "text",
"object": "chat.completion",
"created": 1,
"model": "text",
"system_fingerprint": "text",
"choices": [
{
"index": 1,
"message": {
"role": "system",
"content": "text",
"reasoning_content": "text",
"refusal": null,
"annotations": [
{
"type": "text",
"text": "text",
"start_index": 1,
"end_index": 1,
"file_citation": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"file_path": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
]
},
"finish_reason": "text",
"logprobs": {
"content": [
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
},
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
],
"usage": {
"prompt_tokens": 1,
"completion_tokens": 1,
"total_tokens": 1
},
"perception_usage": {
"prompt_tokens": 1,
"completion_tokens": 1,
"total_tokens": 1
},
"service_tier": "text",
"request_id": "text",
"seed": 1,
"top_p": 1,
"temperature": 1,
"presence_penalty": 1,
"frequency_penalty": 1,
"input_user": "text",
"tools": [
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"response_format": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"responses": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}Update metadata for a chat completion
The ID of the chat completion to update
The ID of workspace to update chat completion in
defaultSuccessful Response
Validation Error
POST /chat/completions/{completion_id} HTTP/1.1
Host: api.activeloop.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 34
{
"ANY_ADDITIONAL_PROPERTY": "text"
}{
"id": "text",
"object": "chat.completion",
"created": 1,
"model": "text",
"system_fingerprint": "text",
"choices": [
{
"index": 1,
"message": {
"role": "system",
"content": "text",
"reasoning_content": "text",
"refusal": null,
"annotations": [
{
"type": "text",
"text": "text",
"start_index": 1,
"end_index": 1,
"file_citation": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"file_path": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
]
},
"finish_reason": "text",
"logprobs": {
"content": [
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
},
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
],
"usage": {
"prompt_tokens": 1,
"completion_tokens": 1,
"total_tokens": 1
},
"perception_usage": {
"prompt_tokens": 1,
"completion_tokens": 1,
"total_tokens": 1
},
"service_tier": "text",
"request_id": "text",
"seed": 1,
"top_p": 1,
"temperature": 1,
"presence_penalty": 1,
"frequency_penalty": 1,
"input_user": "text",
"tools": [
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"response_format": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"responses": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}Get messages for a chat completion
The ID of the chat completion
The ID of workspace to lookup chat completion messages in
defaultIdentifier for the last message from the previous pagination request
Number of messages to retrieve
20Sort order for messages by timestamp
ascSuccessful Response
Validation Error
GET /chat/completions/{completion_id}/messages HTTP/1.1
Host: api.activeloop.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"object": "list",
"data": [
{
"id": "text",
"role": "system",
"content": "text",
"name": "text",
"content_parts": [
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
]
}
],
"first_id": "text",
"last_id": "text",
"has_more": false
}Delete a chat completion
The ID of the chat completion to delete
The ID of workspace to delete chat completion in
defaultSuccessful Response
Validation Error
DELETE /chat/completions/{completion_id} HTTP/1.1
Host: api.activeloop.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "text",
"object": "chat.completion.deleted",
"deleted": true
}Last updated

