Skip to main content
POST
Search from Private Library
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 across images you have uploaded to your Private Image Library. This is a separate library from your Private Video Library — it uses a different endpoint (BY_IMAGE) and returns image results, not video clips. To search videos instead, see Search by Text, Search by Image, or Search by Transcript.

Prerequisites

Endpoint

Use search_type=BY_IMAGE to search the Private Image Library. Using any other search_type on this endpoint searches the video library instead.

Authentication

Request Example

Parameters

search_param
string
required
Natural-language search query. Must be non-empty.
search_type
string
required
Must be BY_IMAGE to search the Private Image Library.
folder_id is not supported for BY_IMAGE search and will be rejected. Folder filtering applies to video search only.
top_k
integer
default:"100"
Maximum results to return. Range: 1 – 1000.
filtering_level
string
Minimum similarity score:
  • low — score ≥ 0.15
  • medium — score ≥ 0.225
  • high — score ≥ 0.4
Omit to return all results regardless of score.
tag
string
Filter to images carrying this tag.
datetime_taken
string
Filter to images captured at or after this time. Format: yyyy-MM-dd HH:mm:ss.
latitude
number
GPS latitude filter. Must be paired with longitude.
longitude
number
GPS longitude filter. Must be paired with latitude.

Response

BY_IMAGE returns image items — a different response shape from video search.
data.current_page
integer
Zero-based page index.
data.page_size
integer
Items per page.
data.total_count
integer
Total matching images.
data.item[].id
integer
Unique image identifier.
data.item[].name
string
Image filename or display name.
data.item[].img_url
string
Signed URL to access the image. Expires — do not cache long-term.
data.item[].datetime_taken
integer
Capture timestamp in milliseconds since epoch.
data.item[].camera_model
string
Camera model recorded at upload time.
data.item[].latitude
number
GPS latitude where the image was captured.
data.item[].longitude
number
GPS longitude where the image was captured.
data.item[].bucket
string
GCS bucket of the image. Omitted when the storage location cannot be resolved.
data.item[].blob
string
GCS blob (object) path of the image. Use it with bucket at GET /serve/api/v2/download?bucket=&blob= to fetch the file directly.
data.item[].score
number
Relevance score. Higher is more relevant.

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.

Authorizations

Authorization
string
header
required

Body

application/json
search_param
string
required

Natural-language search query. Must be non-empty.

Example:

"boat in the ocean"

search_type
enum<string>
default:BY_CLIP

Search modality. BY_VIDEO is treated as BY_CLIP internally. BY_CAPTION performs vector search over the video_transcript table and returns a different item shape (see response).

Available options:
BY_VIDEO,
BY_CLIP,
BY_AUDIO,
BY_IMAGE,
BY_CAPTION
Example:

"BY_CLIP"

top_k
integer
default:100

Maximum number of results to return. Range 1-1000 for BY_CLIP/BY_AUDIO/BY_IMAGE. For BY_CAPTION the range is 1-200 (server-side default is 10 when null).

Required range: 1 <= x <= 1000
filtering_level
enum<string>

Similarity-score filter. low=0.15, medium=0.225, high=0.4.

Available options:
low,
medium,
high
Example:

"medium"

video_nos
string[]

Optional list of video numbers to restrict the search to. Max 100.

Maximum array length: 100
Example:
tag
string

Optional tag filter.

Example:

"test1"

camera_tag
string

Optional camera/device model filter. Matches the camera_model supplied at upload time.

Example:

"Canon EOS 5D"

datetime_taken
string

Optional capture-time filter in format yyyy-MM-dd HH:mm:ss.

Example:

"2025-10-20 11:00:00"

latitude
number<double>

Optional latitude filter. Must be supplied together with longitude.

Example:

88.88

longitude
number<double>

Optional longitude filter. Must be supplied together with latitude.

Example:

88.88

folder_id
integer

Optional. Restrict results to a single folder. Omit to query across your entire account. -1 is the Default folder; a positive id must belong to your account.

Example:

671631448308117500

Response

200 - application/json

Successful response

Response shape depends on search_type. For BY_CLIP / BY_VIDEO / BY_AUDIO data is an array of video-search items (carries video_bucket/video_blob and, for BY_CLIP, keyframe_bucket/keyframe_blob); for BY_IMAGE data is a paginated image-search object (items carry bucket/blob); for BY_CAPTION data is an array of caption-search items carrying the embedding vector, text, user_id, and time range.

code
string
Example:

"0000"

msg
string
Example:

"success"

data
object
success
boolean
Example:

true

failed
boolean
Example:

false