> ## 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.

# Get Asset Metadata

> Retrieve metadata information for a specific asset

<Info>
  **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)
</Info>

This endpoint retrieves detailed metadata about an asset, including file information, dimensions, duration, and other properties.

### Code Examples

<CodeGroup>
  ```javascript fetch theme={null}
  const BASE_URL = "https://mavi-backend.memories.ai/serve/api/v2";
  const API_KEY = "sk-mavi-...";
  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);
  ```

  ```javascript axios theme={null}
  import axios from 'axios';

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

  const response = await axios.get(`${BASE_URL}/${assetId}/metadata`, {
    headers: {
      'Authorization': API_KEY
    }
  });

  console.log(response.data);
  ```

  ```python Python theme={null}
  import requests

  BASE_URL = "https://mavi-backend.memories.ai/serve/api/v2"
  API_KEY = "sk-mavi-..."
  HEADERS = {
      "Authorization": f"{API_KEY}"
  }

  def get_metadata(asset_id):
      url = f"{BASE_URL}/{asset_id}/metadata"
      response = requests.get(url, headers=HEADERS)
      return response.json()

  # Usage example
  metadata = get_metadata("re_657739295220518912")
  print(metadata)
  ```
</CodeGroup>

### Path Parameters

| Parameter | Type   | Required | Description                                                         |
| --------- | ------ | -------- | ------------------------------------------------------------------- |
| asset\_id | string | Yes      | The unique identifier of the asset (e.g., "re\_660729180626595840") |

### Response

Returns comprehensive metadata about the asset.

<ResponseExample>
  ```json theme={null}
  {
    "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
  }
  ```
</ResponseExample>

### Response Parameters

| Parameter                           | Type    | Description                                                                 |
| ----------------------------------- | ------- | --------------------------------------------------------------------------- |
| code                                | string  | Response code indicating the result status                                  |
| msg                                 | string  | Response message describing the operation result                            |
| data                                | object  | Response data object containing asset metadata information                  |
| data.total                          | integer | Total number of assets returned                                             |
| data.resource                       | array   | Array of asset metadata objects                                             |
| data.resource\[].extension          | string  | File extension of the asset (e.g., "mp4", "jpg")                            |
| data.resource\[].asset\_id          | string  | Unique identifier of the asset                                              |
| data.resource\[].original\_filename | string  | Original filename of the uploaded file                                      |
| data.resource\[].file\_size         | string  | Size of the file in bytes (as string)                                       |
| data.resource\[].upload\_status     | string  | Status of the upload operation (e.g., "SUCCESS")                            |
| data.resource\[].create\_time       | string  | Timestamp when the asset was created (Unix timestamp in milliseconds)       |
| data.resource\[].modify\_time       | string  | Timestamp when the asset was last modified (Unix timestamp in milliseconds) |
| success                             | boolean | Indicates whether the operation was successful                              |
| failed                              | boolean | Indicates 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


## OpenAPI

````yaml GET /{asset_id}/metadata
openapi: 3.1.0
info:
  title: MAVI API Reference
  description: REST APIs for memory management, search, and entity operations
  version: v1.0.1
servers:
  - url: https://mavi-backend.memories.ai/serve/api/v2
security:
  - ApiKeyAuth: []
paths:
  /{asset_id}/metadata:
    get:
      summary: Get Asset Metadata
      operationId: get_metadata
      parameters:
        - name: asset_id
          in: path
          required: true
          schema:
            type: string
          description: The unique identifier of the asset
          example: re_657739295220518912
      responses:
        '200':
          description: Metadata retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    example: 200
                    description: Response code indicating the result status
                  msg:
                    type: string
                    example: success
                    description: Response message describing the operation result
                  data:
                    type: object
                    properties:
                      total:
                        type: integer
                        example: 1
                        description: Total number of assets returned
                      resource:
                        type: array
                        items:
                          type: object
                          properties:
                            extension:
                              type: string
                              example: mp4
                              description: File extension of the asset (e.g., "mp4", "jpg")
                            asset_id:
                              type: string
                              example: re_660729180626595840
                              description: Unique identifier of the asset
                            original_filename:
                              type: string
                              example: '3'
                              description: Original filename of the uploaded file
                            file_size:
                              type: string
                              example: '133652816'
                              description: Size of the file in bytes (as string)
                            upload_status:
                              type: string
                              example: SUCCESS
                              description: Status of the upload operation (e.g., "SUCCESS")
                            create_time:
                              type: string
                              example: '1766989317192'
                              description: >-
                                Timestamp when the asset was created (Unix
                                timestamp in milliseconds)
                            modify_time:
                              type: string
                              example: '1766989317192'
                              description: >-
                                Timestamp when the asset was last modified (Unix
                                timestamp in milliseconds)
                        description: Array of asset metadata objects
                    description: Response data object containing asset metadata information
                  success:
                    type: boolean
                    example: true
                    description: Indicates whether the operation was successful
                  failed:
                    type: boolean
                    example: false
                    description: Indicates whether the operation failed
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization

````