List Chat Sessions
Use this API to retrieve a paginated list of historical chat sessions, including metadata such as session IDs, timestamps, and related videos.
Prerequisites
- You‘re familiar with the concepts described on the Platform overview page.
- You have previously used the Video Chat API to create sessions.
- You have a valid memories.ai API key.
Host URL
https://api.memories.ai
Endpoint
GET /serve/api/video/list_sessions
Request Example
import requests
headers = {"Authorization": "<API_KEY>"}
params = {
"page": "<PAGE_NUM>"
}
response = requests.get("https://api.memories.ai/serve/api/video/list_sessions", headers=headers, params=params)
print(response.json())
Response Example
{
"code": "0000",
"msg": "success",
"data": {
"sessions": [
{
"sessionId": "601308802842759168",
"title": "Identify common objects across all videos."
},
{
"sessionId": "601308024392519680",
"title": "Identify common objects across all videos."
},
{
"sessionId": "601307898781503488",
"title": "Identify common objects across all videos."
},
{
"sessionId": "601307775271833600",
"title": "Identify common objects across all videos."
},
{
"sessionId": "601306626737180672",
"title": "Identify common objects across all videos."
},
{
"sessionId": "601295262723477504",
"title": "Identify common objects across all videos."
},
{
"sessionId": "601295114840707072",
"title": "Identify common objects across all videos."
},
{
"sessionId": "601290664273121280",
"title": "What sports games have been on recently, and what were the results?"
},
{
"sessionId": "601290471351914496",
"title": "What sports games have been on recently, and what were the results?"
},
{
"sessionId": "601290207567941632",
"title": "What sports games have been on recently, and what were the results?"
},
{
"sessionId": "601287205255778304",
"title": "111"
},
{
"sessionId": "601286465544130560",
"title": "Identify common objects across all videos."
}
],
"current_page": 1,
"page_size": 20,
"total_count": "18"
},
"success": true,
"failed": false
}
Request Parameters
Name | Location | Type | Required | Description |
---|---|---|---|---|
page | query | int | No | Page number for pagination (default: 1) |
Authorization | header | string | Yes | Your API key for authentication |
Response Structure
Name | Type | Description |
---|---|---|
code | string | Response status code |
msg | string | Human-readable status message |
data | object | Paginated session data container |
» sessions | list of objects | List of chat session entries |
»» session_id | string | Unique identifier for the session |
»» video_no | string | Associated video ID |
»» created_time | string (timestamp) | Time when the session was created |
» page | int | Current page number |
» total_pages | int | Total number of pages available |
» total_count | int | Total number of sessions |
Notes
- Pagination starts at
page=1
. - Use the
session_id
returned here to query messages with the Get Chat History API. - This endpoint only returns sessions that were previously created through interactive chat or summary APIs.