Search Key Clip
While the Search-Video API retrieves the most relevant videos, this API identifies and ranks the most relevant clips within one or multiple videos. The output is sorted by the relevance of the clips. With this API, developers can quickly pinpoint moments of interest across all uploaded videos in just milliseconds.
Host URL
POST /api/serve/video/searchVideoFragment
Request Example
import requests
headers = {"Authorization": token} # access token
data = {"videoNos": [], "searchValue": "<your prompt>"}
response = requests.post(
"https://mavi-backend.memories.ai/api/serve/video/searchVideoFragment",
headers=headers,
json=data
)
Request Body
{
"videoNos": [],
"searchValue": "string"
}
Request Parameters
Name | Location | Type | Required | Description |
---|---|---|---|---|
Authorization | header | string | Yes | authorization token |
videoNos | body | [string] | Yes | list of video IDs to search from (max 50 for free tier) |
searchValue | body | string | Yes | search prompt |
Response Example
{
"code": "string",
"msg": "string",
"data": {
"videos": [
{
"videoNo": "string",
"videoName": "string",
"videoStatus": "string",
"uploadTime": "string",
"duration": "string"
}
]
}
}
Response Result
Status code | Status code msg | Description | Data |
---|---|---|---|
200 | OK | none | Inline |
Response Structure
Status code 200
Name | Type | Required | Restriction | Description |
---|---|---|---|---|
code | string | true | none | response code |
msg | string | true | none | message with response code |
data | object | true | none | JSON data |
» videos | [object] | true | none | JSON data |
»» videoNo | string | false | none | video number |
»» videoName | string | false | none | video name/title |
»» videoStatus | string | false | none | video processing status |
»» uploadTime | string | false | none | upload timesatmp(ms) |
»» duration | string | false | none | video length(seconds) |
»» fragmentStartTime | string | true | none | video clip start time (s) |
»» fragmentEndTime | string | true | none | video clip end time(s) |