Clip Video
Video Editing Agent
Scene Detection
Detect scene boundaries in a video asset
POST
Clip Video
Product: Visual Agents
Use case: Managed endpoints powering Memories.ai’s open-source video search and editing agents (queries, video clipping/editing, screenplay extraction)
Host:
https://mavi-backend.memories.ai/serve/api/v2
Auth: Authorization: sk-mavi-... (no Bearer prefix)Pricing:
- $0.02/second of video
Code Examples
Request Body
Response
Returns task information for the video clip creation operation.Response Parameters
Callback Response Parameters
When the video clipping is complete, a callback will be sent to your configured webhook URL.Understanding the Callback Response
The callback response contains an array of scene segments identified in the video, each with start and end frame numbers. Response Structure:- Scene segments:
callback_response.data.data.data - Number of scenes detected:
callback_response.data.data.data.length - First scene start frame:
callback_response.data.data.data[0].start - First scene end frame:
callback_response.data.data.data[0].end - Execution time:
callback_response.data.data.exec_time - Success status:
callback_response.data.success - Task ID:
callback_response.task_id
start: The frame number where the scene begins (inclusive)end: The frame number where the scene ends (inclusive)- Frame numbers are 0-indexed and based on the original video’s FPS
- Scenes are automatically detected based on visual content changes
{start: 0, end: 46}→ 0s to 1.92s{start: 47, end: 143}→ 1.96s to 5.96s
Notes
- Video clipping is processed asynchronously
- Returns a task_id that can be used to track the clip creation progress
- Use the task_id to query the status and results of clip creation
- Original video remains unchanged
Authorizations
Body
application/json
The video asset ID to create a clip from
Example:
"re_657739295220518912"
Response
200 - application/json
Video clip creation initiated successfully
Response code indicating the result status
Example:
200
Response message describing the operation result
Example:
"success"
Response data object containing task information
Indicates whether the operation was successful
Example:
true
Indicates whether the operation failed
Example:
false
