Download Video
Library Management
Download Video
Download the original video file for a given video in your Private Video Library.
POST
Download Video
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)Prerequisites
- You have created a memories.ai API key.
Endpoint
POST /serve/api/v1/downloadAuthentication
Include your API key in the Authorization header.Request
Content-Type:application/json
Request Parameters
The video identifier to download.
Python Example
cURL Example
Successful Response
On success, the server returns the video file as a binary stream:- Status: 200
- Content-Type:
application/octet-stream - Body: Binary content of the video (mp4 — the first bytes are an
ftypISO-BMFF box)
The download uses HTTP chunked transfer encoding, so
Content-Length is typically absent. Don’t use it for progress reporting; rely on iter_content chunk counts instead.Error Response (JSON)
If the download cannot be fulfilled, a JSON payload is returned instead — same HTTP status (200) but Content-Type: application/json. The Python and cURL examples above already branch on the response content type.
Unknown or wrong-namespace video_no:
video_no in the request body:
Branch on
Content-Type (or check success: false) rather than parsing msg text — the message strings are short, sometimes use full-width punctuation, and aren’t a stable contract.Tips
- Stream downloads: Always use
stream=True(Python) to avoid loading the entire file into memory.
