# Get Assets

In this section you can find all of Misty's API calls related to fetching information about her stored assets. To display a list of assets in the output field in the Python Interface you will need to use the syntax shown in the example below:

```python
from mistyPy.Robot import Robot

# Initialize Misty
misty = Robot()

# Get the list of videos
video_list = misty.get_video_list()

# Check if video list is retrieved successfully
if video_list is not None:
    # Print the list of videos
    print("List of Videos:")
    for video in video_list:
        print(video)
else:
    print("Failed to retrieve the video list.")
```

### **GetAudioFile**

Obtains a system or user-uploaded audio file currently stored on Misty.

**Example Code**

{% hint style="success" %}

```python
misty.get_audiofile("myaudio.mp4", false)
```

{% endhint %}

**Parameters**

```python
misty.get_audio_file(self, fileName : str = None, base64 : bool = None)
```

* FileName (string): The name of the audio file to get, including its file type extension.
* Base64 (boolean): Optional. Sending a request with `true` returns the audio file data as a downloadable Base64 string. Sending a request with `false` returns the audio file to your browser or REST client. Defaults to `false`.

### **GetAudioList**

Lists all audio files (default system files and user-uploaded files) currently stored on Misty.

{% hint style="success" %}

```
misty.get_audio_list()
```

{% endhint %}

### **GetImage**

Obtains a system or user-uploaded image file.

**Example Code**

{% hint style="success" %}

```python
misty.get_image("e_Amazement.jpg", false)
```

{% endhint %}

**Parameters**

{% code overflow="wrap" %}

```python
misty.get_image(self, fileName : str = None, base64 : bool = None)
```

{% endcode %}

* FileName (string) - The name of the image file to get, including the file type extension.
* Base64 (boolean) - Optional. Sending a request with `true` returns the image data as a downloadable Base64 string. Sending a request with `false` displays the image in your browser or REST client immediately after the image is taken. Default is `true`.

### **GetImageList**

Obtains a list of the images currently stored on Misty.

{% hint style="success" %}

```
misty.get_image_list()
```

{% endhint %}

### **GetVideo**

Obtains a user-uploaded video file currently stored on Misty.

**Note:** This command only obtains user-uploaded video assets. To obtain a video recording that Misty created, you must use the [`GetVideoRecording`](https://docs.mistyrobotics.com/misty-ii/web-api/api-reference/#getvideorecording) command.

**Example Code**

{% hint style="success" %}

```python
misty.get_video("myvideo.mp4", false)
```

{% endhint %}

**Parameters**

{% code overflow="wrap" %}

```python
misty.get_video(self, fileName : str = None, base64 : bool = None)
```

{% endcode %}

* FileName (string) - The name of the video to obtain, with the file type extension.
* Base64 (boolean) - Optional. Sending a request with `true` returns the video data as a Base64-encoded string. Sending a request with `false` downloads the video file to your REST client. Default is `false`.

### **GetVideoList**

Obtains a list of the user-uploaded video assets saved to Misty's storage.

**Note:** This command only obtains a list of user-uploaded video assets. To obtain a list of video recordings that Misty created, you must use the [`GetVideoRecordingsList`](https://docs.mistyrobotics.com/misty-ii/web-api/api-reference/#getvideorecordingslist) command.

{% hint style="success" %}

```python
misty.get_video_list()
```

{% endhint %}

### GetVideoRecording

Downloads a video that Misty has created. Optionally, returns the video data as a Base64 string.

You can only use this command to download videos that Misty recorded. To get videos that you or another user has uploaded, use the [`GetVideo`](https://docs.mistyrobotics.com/misty-ii/web-api/api-reference/#getvideo) command.

**Example Code**

{% hint style="success" %}

```python
misty.get_video_recording("myrecording.mp4",true)
```

{% endhint %}

**Tip:** Misty records videos in .mp4 format. Video recordings have a maximum resolution of 3840 x 2160 pixels and can be up to 3 minutes long. A single video file can be up to 225 MB and can take several minutes to download.

**Parameters**

```python
misty.get_video_recording(self, name : str = None, base64 : bool = None)
```

* Name (string) - Optional. The filename of the video to download. If not supplied, defaults to `misty_video`.
* Base64 (boolean) - Optional. Sending a request with `true` returns the video data as a Base64-encoded string. Sending a request with `false` downloads the video file to your REST client. Defaults to `false`.

### GetVideoRecordingList

Obtains a list of filenames for each video recording saved to Misty's local storage.

{% hint style="success" %}

```python
misty.get_video_recording_list()
```

{% endhint %}

### **GetKnownFaces**

Obtains a list of the names of faces on which Misty has been successfully trained.

{% hint style="success" %}

```
misty.get_known_faces()
```

{% endhint %}

### **GetConversations**

Obtains a list of conversations stored in Misty's memory.

{% hint style="success" %}

```
misty.get_conversations()
```

{% endhint %}

### GetLoadedContexts

Obtains a list of loaded contexts used for NLP.

{% hint style="success" %}

```
misty.get_loaded_contexts()
```

{% endhint %}

### **GetStates**

Obtains a list of states used in your conversation.

{% hint style="success" %}

```
misty.get_states()
```

{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lessons.mistyrobotics.com/python-elements/misty-python-api/get-assets.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
