v1
latestOpenAPI 3.1.02026-07-17122076.0 KBStream
Summarize a stream
Aggregate existing captions for a stream from the database via CA-RAG and return a structured summary. The stream must have been previously started with /v1/generate_captions.
post/v1/stream_summarize
Request body
Example request
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"model": "cosmos-reason1",
"camera_id": "camera_1"
}Response
Successful Response.
Example response
{
"choices": [
{
"index": 1,
"message": {
"content": "Some summary of the video",
"tool_calls": [
{
"alert": {
"ntpTimestamp": "2024-05-30T01:41:25.000Z",
"offset": 20
}
}
]
}
}
],
"created": 1717405636,
"model": "cosmos-reason1",
"media_info": {
"start_timestamp": "2024-05-30T01:41:25.000Z",
"end_timestamp": "2024-05-30T02:14:51.000Z"
},
"usage": {
"query_processing_time": 78,
"total_chunks_processed": 10,
"summary_tokens": 100,
"aggregation_tokens": 100,
"summary_requests": 10,
"summary_latency": 1,
"aggregation_latency": 1
}
}