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)
Use a natural-language query to find relevant clips or audio moments from the pre-indexed public social-media library — no upload required. For image queries see Search Public — by Image; for exact-phrase transcript search see Search Public — by Transcript.
Prerequisites
Request Example
import requests
headers = {"Authorization": "sk-mavi-..."}
response = requests.post(
"https://api.memories.ai/serve/api/v1/search_public",
headers=headers,
json={
"search_param": "sprint race with Usain Bolt",
"search_type": "BY_VIDEO",
"type": "TIKTOK",
"top_k": 10,
"filtering_level": "medium"
}
)
print(response.json())
Parameters
Natural-language search query. Must be non-empty.
What to search. The server-side enum is [BY_CLIP, BY_VIDEO, BY_AUDIO, BY_IMAGE]; only the first three are meaningful here (BY_IMAGE is exposed via the dedicated Search Public — by Image endpoint).
BY_VIDEO — video clips (default). BY_CLIP is an accepted alias.
BY_AUDIO — spoken-word transcripts (semantic, not exact-match). audio_ts is only populated in the response for this mode.
Unknown values are rejected with code: "0003" and a JSON deserialization error listing the live enum values.
Platform to search. One of TIKTOK, YOUTUBE, INSTAGRAM. The server does not validate this string — passing an unknown value silently falls back to a default rather than returning an error, so prefer one of the documented values explicitly.
Maximum results to return. Range: 1 – 1000.
Minimum similarity score threshold:
low — score ≥ 0.15
medium — score ≥ 0.225
high — score ≥ 0.4
When omitted, no score filter is applied.
Response
{
"code": "0000",
"msg": "success",
"data": [
{
"videoNo": "PI-600947902470296459",
"videoName": "They played in their OPPONENTS jerseys?!?",
"startTime": "23",
"endTime": "27",
"audio_ts": "...matched transcript text...",
"score": 0.7350679636001586,
"video_bucket": "mavi-public-video",
"video_blob": "<scraper-id>.mp4",
"keyframe_bucket": "mavi-public-keyframe",
"keyframe_blob": "<uuid>/keyframe-000023.jpg"
}
],
"success": true,
"failed": false
}
Public video identifier (typically prefixed with PI-).
Public video title or name.
Matched segment start time, in seconds.
Matched segment end time, in seconds.
Transcript text of the segment. Populated for BY_AUDIO searches.
Relevance score. Higher is more relevant.
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 (BY_CLIP only).
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.
Natural-language search query. Must be non-empty.
Example:"Find sprint race with Usain Bolt"
search_type
enum<string>
default:BY_CLIP
Search modality. Only BY_VIDEO and BY_AUDIO are accepted here; BY_CLIP and BY_IMAGE are explicitly rejected. BY_VIDEO is treated as BY_CLIP internally.
Available options:
BY_VIDEO,
BY_AUDIO
type
enum<string>
default:TIKTOK
Source platform to search within.
Available options:
TIKTOK,
YOUTUBE,
INSTAGRAM
Scope identifier for the authenticated account.
Maximum number of results to return. Range 1-1000.
Required range: 1 <= x <= 1000
Similarity-score filter. low=0.15, medium=0.225, high=0.4.
Available options:
low,
medium,
high