GET
/
{asset_id}
/
metadata
Get Asset Metadata
curl --request GET \
  --url https://mavi-backend.memories.ai/serve/api/v2/{asset_id}/metadata \
  --header 'Authorization: <api-key>'
{
  "code": "0000",
  "msg": "success",
  "data": {
    "total": 1,
    "resource": [
      {
        "extension": "mp4",
        "asset_id": "re_660729180626595840",
        "original_filename": "3",
        "file_size": "133652816",
        "upload_status": "SUCCESS",
        "create_time": "1766989317192",
        "modify_time": "1766989317192"
      }
    ]
  },
  "success": true,
  "failed": false
}
This endpoint retrieves detailed metadata about an asset, including file information, dimensions, duration, and other properties.

Code Examples

const assetId = "re_657739295220518912";

const response = await fetch(`/${assetId}/metadata`, {
  method: 'GET',
  headers: {
    'Authorization': 'sk-8483027fe3abfe535f6ae01a9979b4f7'
  }
});

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

Path Parameters

ParameterTypeRequiredDescription
asset_idstringYesThe unique identifier of the asset (e.g., “re_660729180626595840”)

Response

Returns comprehensive metadata about the asset.
{
  "code": "0000",
  "msg": "success",
  "data": {
    "total": 1,
    "resource": [
      {
        "extension": "mp4",
        "asset_id": "re_660729180626595840",
        "original_filename": "3",
        "file_size": "133652816",
        "upload_status": "SUCCESS",
        "create_time": "1766989317192",
        "modify_time": "1766989317192"
      }
    ]
  },
  "success": true,
  "failed": false
}

Response Parameters

ParameterTypeDescription
codestringResponse code indicating the result status
msgstringResponse message describing the operation result
dataobjectResponse data object containing asset metadata information
data.totalintegerTotal number of assets returned
data.resourcearrayArray of asset metadata objects
data.resource[].extensionstringFile extension of the asset (e.g., “mp4”, “jpg”)
data.resource[].asset_idstringUnique identifier of the asset
data.resource[].original_filenamestringOriginal filename of the uploaded file
data.resource[].file_sizestringSize of the file in bytes (as string)
data.resource[].upload_statusstringStatus of the upload operation (e.g., “SUCCESS”)
data.resource[].create_timestringTimestamp when the asset was created (Unix timestamp in milliseconds)
data.resource[].modify_timestringTimestamp when the asset was last modified (Unix timestamp in milliseconds)
successbooleanIndicates whether the operation was successful
failedbooleanIndicates whether the operation failed

Notes

  • Returns detailed file properties and encoding information
  • Video assets include duration, resolution, and format details
  • Image assets include dimensions and color space information

Authorizations

Authorization
string
header
required

Path Parameters

asset_id
string
required

The unique identifier of the asset

Response

200 - application/json

Metadata retrieved successfully

code
string

Response code indicating the result status

Example:

"0000"

msg
string

Response message describing the operation result

Example:

"success"

data
object

Response data object containing asset metadata information

success
boolean

Indicates whether the operation was successful

Example:

true

failed
boolean

Indicates whether the operation failed

Example:

false