Generate Video Summary
Use this API to generate a structured summary of a video, either in the form of chapters or topics.
Prerequisites
- You’re familiar with the concepts described on the Platform overview page.
- You have uploaded a video via the Upload API and obtained its
videoNo
. - You have a valid memories.ai API key.
- The video must be successfully parsed and transcribed.
Host URL
https://api.memories.ai
Endpoint
GET /serve/api/video/generate_summary
Request Example
import requests
headers = {"Authorization": "<API_KEY>"}
params = {
"video_no": "<video_no>",
"type": "<type>"
}
response = requests.get("https://api.memories.ai/serve/api/video/generate_summary", headers=headers, params=params)
print("Status:", response.status_code)
try:
print("Summary Response:", response.json())
except Exception:
print("Response Text:", response.text)
Request Parameters
Name | Location | Type | Required | Description |
---|---|---|---|---|
video_no | query | string | Yes | Unique video number returned after upload |
type | query | string | Yes | Type of summary to generate. Accepted values: CHAPTER , TOPIC |
Authorization | header | string | Yes | Your API key for authentication |
Response Example
Status code 200
{
"code": "0000",
"msg": "success",
"data": {
"summary": "The video seems to capture a family in a parking lot, possibly dealing with a minor emergency or preparing to leave. The audio consists of fragmented speech, mainly a child's voice repeating \"Mommy, you're going to go,\" suggesting a departure or concern. The visual content shows the family approaching their car with shopping bags and a red backpack. There is no clear indication of what's happening, so it's hard to say definitively what the video is about without additional context.",
"items": [
{
"description": "A woman, a boy, and another woman are walking towards a parked car in a parking lot. They are carrying shopping bags. The car doors are open.",
"title": "Arrival at the Car",
"start": "0"
},
{
"description": "The boy is looking at his phone near the open car door. One of the women is bending down, seemingly interacting with something on the ground near the car.",
"title": "Phone and Interaction on the Ground",
"start": "10"
},
{
"description": "Close-up view reveals objects on a concrete surface, including brown planters, a black pipe, a red tool, and a yellow broom or mop handle.",
"title": "Close-up of Objects on the Ground",
"start": "30"
}
]
},
"success": true,
"failed": false
}
Request Parameters
Name | Location | Type | Required | Description |
---|---|---|---|---|
video_no | query | string | Yes | Unique video number returned after upload |
type | query | string | Yes | Type of summary to generate. Accepted values: CHAPTER , TOPIC |
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 | Response data container |
» videoNo | string | The unique video ID |
» summary_type | string | The requested summary type (CHAPTER or TOPIC ) |
» summary | list of objects | List of structured summary segments |
»» title | string | Title of the segment |
»» start | float | Segment start time in seconds |
»» end | float | Segment end time in seconds |
»» description | string | Natural language description of the segment content |
Notes
- Use
type=CHAPTER
for scene-based structural breakdown. - Use
type=TOPIC
for semantic grouping of related content. - Ensure the video has completed transcription before calling this API.