Skip to main content
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)
Download the original video file for a given video in your Private Video Library. Returns a binary stream on success.

Prerequisites

Endpoint

POST /serve/api/v1/download

Authentication

Include your API key in the Authorization header.

Request

Content-Type: application/json

Request Parameters

video_no
string
required
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 ftyp ISO-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:
Missing 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.

Authorizations

Authorization
string
header
required

Body

application/json
video_no
string
required
Example:

"VI625239098370850816"

Response

Binary video stream or JSON error response

The response is of type file.