API reference for managing conversations and chat sessions
POST /api/conversation/create
Query Parameters:
Parameter | Required | Description |
---|---|---|
org_id | Yes | Organization ID |
Field | Type | Required | Description |
---|---|---|---|
title | string | Yes | Conversation title |
is_archived | boolean | No | Whether the conversation is archived (default: false) |
Field | Type | Description |
---|---|---|
id | string (UUID) | Conversation ID |
title | string | Conversation title |
is_archived | boolean | Archived status |
created_at | string (datetime) | Creation timestamp |
updated_at | string (datetime) | Last update timestamp |
POST /api/conversation/create_session
Query Parameters:
Parameter | Required | Description |
---|---|---|
org_id | Yes | Organization ID |
Field | Type | Required | Description |
---|---|---|---|
conversation_id | string (UUID) | Yes | ID of the conversation |
model_id | string (UUID) | Yes | ID of the language model to use |
Field | Type | Description |
---|---|---|
id | string (UUID) | Chat session ID |
conversation_id | string (UUID) | Conversation ID |
model_id | string (UUID) | Model ID |
status | string | Session status (βactiveβ, βcompletedβ, etc.) |
created_at | string (datetime) | Creation timestamp |
updated_at | string (datetime) | Last update timestamp |
POST /api/conversation/stream_chat
Query Parameters:
Parameter | Required | Description |
---|---|---|
org_id | Yes | Organization ID |
Field | Type | Required | Description |
---|---|---|---|
chat_session_id | string (UUID) | Yes | ID of the chat session |
message | string | Yes | User message to send to the language model |
start
: Indicates the beginning of the response with a message IDcontent
: Contains chunks of the modelβs response contentend
: Indicates the end of the responseGET /api/conversation/list
Query Parameters:
Parameter | Required | Description |
---|---|---|
org_id | Yes | Organization ID |
GET /api/conversation/get_with_sessions
Query Parameters:
Parameter | Required | Description |
---|---|---|
org_id | Yes | Organization ID |
conversation_id | Yes | Conversation ID |
GET /api/conversation/messages
Query Parameters:
Parameter | Required | Description |
---|---|---|
org_id | Yes | Organization ID |
conversation_id | Yes | Conversation ID |
limit | No | Maximum number of messages to return (default: 20) |
offset | No | Number of messages to skip (default: 0) |
Status Code | Description |
---|---|
400 | Bad Request - Invalid input or validation error |
401 | Unauthorized - Invalid or missing token |
403 | Forbidden - Insufficient permissions |
404 | Not Found - Resource doesnβt exist |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error - Server-side error |