Documentation Index
Fetch the complete documentation index at: https://api-tools.memories.ai/llms.txt
Use this file to discover all available pages before exploring further.
Product: Visual Search
Use case: Upload videos and images, auto-index them, then search by natural language, image, or transcript phrase
Host: https://api.memories.ai/serve/api/v1
Auth: Authorization: sk-mavi-... (no Bearer prefix)
Search within a single video. Combine a query image with a natural-language prompt to refine what the search treats as a match (e.g. “focus on the red shirt”). For library-wide image search use Search by Image; for text-only queries use Search by Text.
Prerequisites
Request Example
Uses multipart/form-data. The file part carries the query image; other parameters are sent as form fields.
import requests
headers = {"Authorization": "sk-mavi-..."}
files = [("file", ("query.png", open("query.png", "rb"), "image/png"))]
data = {
"video_no": "VI625239098370850816",
"prompt": "focus on the red shirt, ignore background",
"unique_id": "default"
}
response = requests.post(
"https://api.memories.ai/serve/api/v1/search_clips_by_image",
headers=headers,
files=files,
data=data
)
print(response.json())
Parameters
Query image. Allowed: .jpg, .jpeg, .png, .gif, .bmp, .webp. Maximum 20 MB.
Identifier of the video to search within (e.g. VI625239098370850816).
Natural-language prompt that refines the match (e.g. "focus on the red shirt"). Use English for best results.
Namespace scoping the search to a folder in your account.
Response
{
"code": "0000",
"msg": "success",
"data": [
{
"start_time": 12.5,
"end_time": 18.2,
"score": 0.8631,
"video_bucket": "mavi-resource",
"video_blob": "VI576925607808602112.mp4"
},
{
"start_time": 42.0,
"end_time": 47.8,
"score": 0.8124,
"video_bucket": "mavi-resource",
"video_blob": "VI576925607808602112.mp4"
}
],
"success": true,
"failed": false
}
Clip start time, in seconds.
Clip end time, in seconds.
Similarity score (0 – 1).
GCS bucket of the target video file. Omitted when the storage location cannot be resolved.
GCS blob (object) path of the target video. Use it with video_bucket at GET /serve/api/v2/download?bucket=&blob= to fetch the file directly.
Notes & Limits
- Rate limiting: Exceeding the per-account rate limit returns an error. See Rate limits.
- Billing: Each successful call deducts credits from your account balance.
Query image. Allowed extensions: .jpg/.jpeg/.png/.gif/.bmp/.webp. Content-Type must start with image/. Max 20 MB.
Unique identifier of the video to search within. Must be non-empty.
Natural-language prompt that refines the visual match. Must be non-empty. English recommended.
Example:"focus on the red shirt, ignore background color"
Scope identifier for the authenticated account.