Get messages for a specific chat.
Returns a paginated list of messages in chronological order.
Bearer token (JWT) from OAuth2 login
Path Parameters
The ID of the chat to get messages from
Query Parameters
Number of records to skip for pagination
Maximum number of records to return
Response
Returns an array of message objects.
Unique message identifier
Message role: user or assistant
Message order in conversation
Token count (if available)
Chronological Order: Messages are returned in chronological order based on the sequence field, making it easy to display conversations naturally.
Pagination: For chats with many messages, use pagination to load messages in batches. This improves performance and reduces memory usage in your application.
This endpoint is similar to getting a full chat with /api/v1/chat-history/chats/{chat_id}, but allows for more granular pagination control and doesn’t include the chat metadata.