Skip to main content

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)
Upload a query image and retrieve frames from anywhere in your Private Video Library that are visually similar. To restrict the search to one specific video instead, use Search by Image — Within a Video. For text queries see 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 = {"unique_id": "my-project", "similarity": 0.85}

response = requests.post(
    "https://api.memories.ai/serve/api/v1/search_similar_images",
    headers=headers,
    files=files,
    data=data
)
print(response.json())

Parameters

file
file
required
Query image. Allowed: .jpg, .jpeg, .png, .gif, .bmp, .webp. Maximum 20 MB.
unique_id
string
default:"default"
Namespace scoping the search to a folder in your account.
similarity
number
default:"0.85"
Minimum similarity threshold (0 – 1).

Response

{
    "code": "0000",
    "msg": "success",
    "data": [
        {
            "videoNo": "VI576925607808602112",
            "videoName": "beach_day.mp4",
            "startTime": "42",
            "score": 0.9123,
            "video_bucket": "mavi-resource",
            "video_blob": "VI576925607808602112.mp4",
            "keyframe_bucket": "mavi-keyframe",
            "keyframe_blob": "<uuid>/keyframe-000042.jpg"
        }
    ],
    "success": true,
    "failed": false
}
data[].videoNo
string
Identifier of the matched video.
data[].videoName
string
Internal stored name.
data[].startTime
string
Matched keyframe start time, in seconds.
data[].endTime
string
Matched keyframe end time, in seconds.
data[].score
number
Visual similarity score (0 – 1).
data[].video_bucket
string
GCS bucket of the original video file. Omitted when the storage location cannot be resolved.
data[].video_blob
string
GCS blob (object) path of the original video. Use it with video_bucket at GET /serve/api/v2/download?bucket=&blob= to fetch the file directly.
data[].keyframe_bucket
string
GCS bucket of the matched keyframe image.
data[].keyframe_blob
string
GCS blob (object) path of the matched keyframe image.

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.