We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/video-db/agent-toolkit'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
Cleanup.txt•2.92 kB
# IPYNB Notebook: Cleanup [Source Link](https://github.com/video-db/videodb-cookbook/blob/main/guides/Cleanup.ipynb)
```markdown
## Guide: Cleaning Up Your VideoDB Account
<a href="https://colab.research.google.com/github/video-db/videodb-cookbook/blob/main/guides/Cleanup.ipynb" target="_parent"><img src="https://colab.research.google.com/assets/colab-badge.svg" alt="Open In Colab"/></a>
⚠️ **WARNING: This notebook will permanently delete media files from your VideoDB account. Data loss is irreversible.** ⚠️
🚨 **IMPORTANT: Before proceeding, carefully review the media files you intend to delete. This action cannot be undone.** 🚨
This guide explains how to remove media files and reclaim storage space within your VideoDB account. It covers:
* Deleting videos
* Deleting audio files
* Deleting images
## 🛠️ Setup
---
Before you begin, ensure you have your [VideoDB](https://videodb.io) API key available.
```python
%pip install videodb
```
```python
import os
from videodb import connect
os.environ["VIDEO_DB_API_KEY"] = "YOUR_KEY_HERE" # Replace with your actual API key
conn = connect()
```
## Review Collections
---
This section displays information about your collections and the number of media assets within each.
```python
colls = conn.get_collections()
print(f"Found {len(colls)} collections:\n")
for coll in colls:
videos = coll.get_videos()
audios = coll.get_audios()
images = coll.get_images()
print(f"Collection Name: '{coll.name}' (ID: {coll.id})")
print(f" - Videos : {len(videos)}")
print(f" - Audio : {len(audios)}")
print(f" - Images : {len(images)}\n")
```
## Select the Target Collection
---
Specify the ID of the collection you wish to clean up.
```python
collection_id = "YOUR_COLLECTION_ID_HERE" # Replace with the ID of the collection you want to clean.
```
### ⚠️ Delete All Videos
---
**Irreversibly deletes all videos from the selected collection. Use with extreme caution!**
```python
coll = conn.get_collection(collection_id)
videos = coll.get_videos()
for video in videos:
video.delete()
print(f"Deleted video: {video.name} (ID: {video.id})")
print("Video deletion complete.")
```
### ⚠️ Delete All Audio
---
**Irreversibly deletes all audio files from the selected collection. Use with extreme caution!**
```python
coll = conn.get_collection(collection_id)
audios = coll.get_audios()
for audio in audios:
audio.delete()
print(f"Deleted audio: {audio.name} (ID: {audio.id})")
print("Audio deletion complete.")
```
### ⚠️ Delete All Images
---
**Irreversibly deletes all images from the selected collection. Use with extreme caution!**
```python
coll = conn.get_collection(collection_id)
images = coll.get_images()
for image in images:
image.delete()
print(f"Deleted image: {image.name} (ID: {image.id})")
print("Image deletion complete.")
```
---