Send Message (Non-Streaming)
Method & Path
Authentication
Requires bearer token authentication via theAuthorization header.
Request Body
The user’s message or question to send to the assistant
ID of existing conversation to continue. If omitted or null, a new conversation is created automatically.
Whether to auto-generate a conversation title from the first message. Only applies to new conversations or those with default titles.
Optional LLM provider ID to override the default provider for this message
Optional model ID to use with the specified provider. Must be provided if
provider_id is specified.Response
The AI assistant’s complete response to the user’s message
The conversation ID (either the provided ID or newly created one)
Only present in error cases. When false, indicates the request failed.
Error message if the request failed (e.g., validation errors, processing errors)
Success Response Example
Validation Error Response
Processing Error Response
Error Codes
- 401 Unauthorized: Missing or invalid authentication token
- 404 Not Found: Specified chat_id does not exist or user does not have access
- 422 Unprocessable Entity: Invalid request body format
- 500 Internal Server Error: Processing or database error
Features
Automatic Conversation Creation
Automatic Conversation Creation
When
chat_id is omitted or null, the system automatically creates a new conversation and returns its ID in the response. This allows seamless conversation initiation.Content Validation
Content Validation
Messages are validated against configurable guardrails before processing. If a message contains prohibited content, the request is rejected with a validation error.
Response Caching
Response Caching
Frequently asked questions may be served from cache for faster response times. Cached responses are indistinguishable from newly generated ones.
Model Flexibility
Model Flexibility
Override the default LLM provider and model on a per-message basis using
provider_id and model_id parameters.Retrieve Messages
Method & Path
Authentication
Requires bearer token authentication. Users can only access their own conversations.Path Parameters
Unique identifier of the conversation
Query Parameters
Maximum number of messages to return per page
Number of messages to skip for pagination
Response
Indicates whether an error occurred
Conversation ID
ID of the user who owns this conversation
Conversation title
ISO 8601 timestamp of last conversation update
Array of message objects, sorted chronologically (oldest first)
Total number of messages in the conversation
Limit used for this request
Offset used for this request
Whether more messages are available beyond the current page
Success Response Example
Error Response Example
Error Codes
- 401 Unauthorized: Missing or invalid authentication token
- 404 Not Found: Conversation does not exist, is archived, or user does not have access
- 500 Internal Server Error: Database or server error
Messages are returned in chronological order (oldest first) to facilitate building conversation UIs. Use pagination for conversations with many messages to optimize performance.