Skip to main content
POST
/
video
/
extract-frames
Extract Video Frames
curl --request POST \
  --url https://mavi-backend.memories.ai/serve/api/v2/video/extract-frames \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "asset_id": "re_657739295220518912"
}
'
{
  "code": 200,
  "msg": "success",
  "data": {
    "task_id": "1e8ae1075e054e8abb58e7598c53cbf1"
  },
  "failed": false,
  "success": true
}

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: Upload, manage, and download video/image assets used by other Visual Intelligence APIs Host: https://mavi-backend.memories.ai/serve/api/v2 Auth: Authorization: sk-mavi-... (no Bearer prefix)
This endpoint automatically extracts frames from a video file at regular intervals.
This is an async endpoint. You must configure a webhook URL in Webhooks Settings before calling this endpoint, otherwise you will not receive the processing results. See Webhooks Configuration Guide for details.
Pricing:
  • $0.01/second of video

Code Examples

const BASE_URL = "https://mavi-backend.memories.ai/serve/api/v2";
const API_KEY = "sk-mavi-...";

const response = await fetch(`${BASE_URL}/video/extract-frames`, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': API_KEY
  },
  body: JSON.stringify({
    asset_id: 're_657739295220518912'
  })
});

const data = await response.json();
console.log(data);

Request Body

FieldTypeRequiredDescription
asset_idstringYesThe video asset ID to extract frames from

Response

Returns task information for the frame extraction operation.
{
  "code": 200,
  "msg": "success",
  "data": {
    "task_id": "1e8ae1075e054e8abb58e7598c53cbf1"
  },
  "failed": false,
  "success": true
}

Response Parameters

ParameterTypeDescription
codestringResponse code indicating the result status
msgstringResponse message describing the operation result
dataobjectResponse data object containing task information
data.task_idstringUnique identifier of the frame extraction task
successbooleanIndicates whether the operation was successful
failedbooleanIndicates whether the operation failed

Callback Response Parameters

When the frame extraction is complete, a callback will be sent to your configured webhook URL.
ParameterTypeDescription
codestringResponse code (200 indicates success)
messagestringStatus message (e.g., “SUCCESS”)
dataobjectResponse data object containing the extracted frame information
data.asset_ch_idsarrayArray of individual frame asset IDs. Use any asset_ch_id with the Download or Get Metadata endpoint to download or query a single frame image.
data.asset_idstringThe parent group asset ID for the entire frame collection. Use this ID with the Download endpoint to download all frames as a zip package, or with Get Metadata to list all frames in this collection.
task_idstringThe task ID associated with this frame extraction request

Using the Returned IDs

Frame IDs follow the pattern imc_<parent_id>_<frame_index> (0-indexed).
IDDownload returnsGet Metadata returns
data.asset_id (e.g. im_666914042514116608)Zip of all framesList of all frames in the collection
data.asset_ch_ids[n] (e.g. imc_666914042514116608_0)Single frame imageMetadata for that frame
download_asset("imc_666914042514116608_0")   # single frame
download_asset("im_666914042514116608")       # all frames as zip

Authorizations

Authorization
string
header
required

Body

application/json
asset_id
string
required

The video asset ID to extract frames from

Example:

"re_657739295220518912"

Response

200 - application/json

Frame extraction initiated successfully

code
string

Response code indicating the result status

Example:

200

msg
string

Response message describing the operation result

Example:

"success"

data
object

Response data object containing task information

success
boolean

Indicates whether the operation was successful

Example:

true

failed
boolean

Indicates whether the operation failed

Example:

false