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.
Prerequisites
- You’re familiar with the concepts described on the Platform overview.
- You have created a memories.ai API key.
- At least one video/image has been uploaded to memories.ai and is currently in
PARSE status.
Host URL
Endpoint
POST /serve/api/v1/search
Authentication
Pass your API key in the Authorization request header. Requests without a valid API key are rejected.
Content Type
The endpoint expects a JSON body (application/json).
Request Example
import requests
headers = {"Authorization": "<API_KEY>"}
json_body = {
"search_param": "<YOUR_PROMPT>",
"search_type": "BY_CLIP",
"unique_id": "default",
"top_k": 10,
"filtering_level": "medium",
"video_nos": ["VI635764894954369024"],
"tag": "test1",
"camera_tag": "Canon EOS 5D",
"datetime_taken": "2025-10-20 11:00:00",
"latitude": 88.88,
"longitude": 88.88
}
response = requests.post(
"https://api.memories.ai/serve/api/v1/search",
headers=headers,
json=json_body
)
print(response.json())
Request Parameters
The natural-language search query. Must be non-empty.
One of BY_VIDEO, BY_CLIP, BY_AUDIO, BY_IMAGE. Defaults to BY_CLIP when omitted. BY_VIDEO is treated as BY_CLIP internally.
Scope identifier used to select the folder to search against for the authenticated account. If the folder for this unique_id does not exist yet, it is created automatically. Must be non-empty when explicitly provided.
Maximum number of results to return. Must be an integer in the range 1 – 1000 inclusive.
Similarity-score filter strength. One of low, medium, high (corresponds to minimum scores of 0.15, 0.225, 0.4 respectively). When omitted no level filter is applied.
Optional list of video numbers to restrict the search to. Maximum 100 entries.
Optional tag filter. Only results whose videos/images carry the tag are returned.
Optional camera/device model filter. Matches the camera_model field supplied at upload time.
Optional capture time filter in the exact format yyyy-MM-dd HH:mm:ss (e.g. 2025-10-20 11:00:00). Invalid formats are rejected.
Optional latitude filter (decimal). Must be supplied together with longitude; supplying only one returns a validation error.
Optional longitude filter (decimal). Must be supplied together with latitude.
Notes & Limits
- Rate limiting: The endpoint is protected by a per-account search rate limit. Exceeding the limit returns an error indicating the request has exceeded the limit.
- Billing: This endpoint is metered — each successful call deducts points from your account balance.
- Search modalities:
BY_CLIP / BY_VIDEO search visual segments; BY_AUDIO searches spoken transcripts; BY_IMAGE searches the image library (response shape differs — see below).
Response Example — Video / Audio search (BY_CLIP / BY_VIDEO / BY_AUDIO)
{
"code": "0000",
"msg": "success",
"data": [
{
"videoNo": "VI576925607808602112",
"videoName": "1920447021987282945",
"startTime": "13",
"endTime": "18",
"audio_ts": "...matched transcript text...",
"score": 0.5221236659362116
}
],
"success": true,
"failed": false
}
Response Fields
Internal stored name of the video.
Matched segment start time, in seconds (as string).
Matched segment end time, in seconds (as string).
Matched audio transcript text (populated for BY_AUDIO and when audio transcription is available).
Relevance score of the match.
Response Example — Image search (BY_IMAGE)
{
"code": "0000",
"msg": "success",
"data": {
"current_page": 0,
"page_size": 20,
"total_count": 5,
"item": [
{
"id": 619915496901337088,
"name": "OIX_ZOOM",
"img_url": "https://storage.googleapis.com/.../OIX_ZOOM.jpg?...",
"datetime_taken": 1757285520000,
"camera_model": "Canon EOS 5D",
"latitude": 39.9042,
"longitude": 116.4074,
"score": 0.4711
}
]
},
"success": true,
"failed": false
}
Response Fields
Zero-based page index of the returned slice.
Number of items per page.
Total number of matching images.
Image file name / display name.
data.item[].datetime_taken
Capture time in milliseconds since epoch.
Camera/device model recorded at upload.
Relevance score of the match.
Best Practices
- Use
top_k: Limit results to the most relevant items for efficiency.
- Filter tuning: Adjust
filtering_level to balance recall and precision (low = broad, high = strict).
- Prompt clarity: Make search queries concise and descriptive for optimal ranking.
Natural-language search query. Must be non-empty.
search_type
enum<string>
default:BY_CLIP
Search modality. BY_VIDEO is treated as BY_CLIP internally.
Available options:
BY_VIDEO,
BY_CLIP,
BY_AUDIO,
BY_IMAGE
Scope/folder 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
Optional list of video numbers to restrict the search to. Max 100.
Maximum array length: 100
Optional camera/device model filter. Matches the camera_model supplied at upload time.
Optional capture-time filter in format yyyy-MM-dd HH:mm:ss.
Optional latitude filter. Must be supplied together with longitude.
Optional longitude filter. Must be supplied together with latitude.
Response shape depends on search_type. For BY_CLIP / BY_VIDEO / BY_AUDIO data is an array of video-search items; for BY_IMAGE data is a paginated image-search object.