Skip to main content
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": 200,
  "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 BASE_URL = "https://mavi-backend.memories.ai/serve/api/v2";
const API_KEY = "sk-mai-this_a_test_string_please_use_your_generated_key_during_testing";
const assetId = "re_657739295220518912";

const response = await fetch(`${BASE_URL}/${assetId}/metadata`, {
  method: 'GET',
  headers: {
    'Authorization': API_KEY
  }
});

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": 200,
  "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 file properties including extension, file size, upload status, and timestamps
  • Use upload_status to verify the asset is ready for processing before calling other endpoints

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:

200

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