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 visually similar frames from the pre-indexed public social-media library. For text queries see Search Public — by Text; for exact-phrase transcript search see Search Public — by Transcript.
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 = {"type": "TIKTOK", "similarity": 0.85}
response = requests.post(
"https://api.memories.ai/serve/api/v1/search_public_similar_images",
headers=headers,
files=files,
data=data
)
print(response.json())
Parameters
Query image. Allowed: .jpg, .jpeg, .png, .gif, .bmp, .webp. Maximum 20 MB.
Platform to search. One of TIKTOK, YOUTUBE, INSTAGRAM.
Minimum similarity threshold (0 – 1). Only results with score ≥ this value are returned.
Response
{
"code": "0000",
"msg": "success",
"data": [
{
"videoNo": "PI-600947902470296459",
"videoName": "Sample public video title",
"startTime": "79",
"endTime": "82",
"score": 0.8631,
"video_bucket": "mavi-public-video",
"video_blob": "<scraper-id>.mp4",
"keyframe_bucket": "mavi-public-keyframe",
"keyframe_blob": "<uuid>/keyframe-000079.jpg"
}
],
"success": true,
"failed": false
}
Public video identifier (typically prefixed with PI-).
Public video title or name.
Matched keyframe start time, in seconds.
Matched keyframe end time, in seconds.
Visual similarity score (0 – 1).
GCS bucket of our cached copy of the public video. Omitted when the storage location cannot be resolved.
GCS blob (object) path of the cached video. Use it with video_bucket at GET /serve/api/v2/download?bucket=&blob= to fetch the file directly.
GCS bucket of the matched keyframe image.
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.
Query image. Allowed extensions: .jpg/.jpeg/.png/.gif/.bmp/.webp. Content-Type must start with image/. Max 20 MB.
type
enum<string>
default:TIKTOK
Source platform to search within.
Available options:
TIKTOK,
YOUTUBE,
INSTAGRAM
Scope identifier for the authenticated account.
similarity
number<double>
default:0.85
Minimum similarity threshold (0-1). Results below this score are filtered out.
Required range: 0 <= x <= 1