Skip to main content

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 Intelligence — Asset Management Use case: Stream a stored file directly from GCS using the bucket and blob pair surfaced by other Visual Intelligence / Visual Search endpoints Host: https://mavi-backend.memories.ai/serve/api/v2 Auth: Authorization: sk-mavi-... (no Bearer prefix)
Download a stored file by its bucket and blob directly, without first translating to an asset_id. The response body is a binary file stream; errors are JSON. This is the location-addressed counterpart of Download Asset. Use it when you already have a bucket / blob pair from a search/list response (e.g. Visual Search returns video_bucket / video_blob and keyframe_bucket / keyframe_blob in its v1 query endpoints).
Pricing: $0.12 / GB downloaded — same model as Download Asset.

Code Examples

curl --request GET \
  --url 'https://mavi-backend.memories.ai/serve/api/v2/download?bucket=mavi-resource&blob=VI625239098370850816.mp4' \
  --header 'Authorization: sk-mavi-...' \
  --remote-name \
  --remote-header-name

Query Parameters

ParameterTypeRequiredDescription
bucketstringYesGCS bucket holding the file.
blobstringYesGCS object path inside bucket. Internal slashes are allowed and should not be percent-encoded.

Response

Success (200): Binary file stream. Response headers include:
  • Content-Type — MIME type (e.g. video/mp4)
  • Content-Disposition: attachment; filename="..." — original filename
  • Content-Length — file size in bytes (may be absent under chunked encoding)
Error: JSON with code, msg, success: false, failed: true. Common cases:
  • Bucket cannot be null or empty — missing or empty bucket query parameter
  • Blob cannot be null or empty — missing or empty blob query parameter
  • Resource does not exist — the object is not present in the bucket (wrong values, already deleted, or different account namespace)
  • Insufficient balance to download the resource. Please recharge and try again. — out of credits; nothing is streamed

Notes

  • Use stream=True (Python) or responseType: 'stream' (axios) to avoid loading the entire file into memory.
  • Billing is size-based — the deduction happens before the stream is written; failed validation (Resource does not exist, etc.) is not billed.
  • The bucket / blob pair becomes invalid when the underlying asset is deleted via Delete Asset.
  • For asset-ID-addressed download, see Download Asset.