> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Introduction



## Article: Introduction

## Article Link: https://dev.wix.com/docs/velo/apis/wix-media-v2/introduction.md

## Article Content:

# Introduction

<!-- &nbsp;

<div style="background-color: #FEF1D1; padding: 18px 24px; border-radius: 6px; border: 1px solid #FDB10C; box-sizing: border-box; display: inline-block">
    <b>Developer Preview</b>
    <br/>
    <span>APIs in <a href="fallback::https://www.wix.com/velo/reference/api-overview/developer-preview">Developer Preview</a> are subject to change and are not intended for use in production.<br/><a href="fallback::mailto:velo-preview-feedback@wix.com">Send us</a> your suggestions for improving this API. Your feedback is valuable to us.</span>
</div>

&nbsp; -->

<!-- > **Note:**
> This module is [universal](invalid-url). Functions in this module can run on both the backend and frontend, unless specified otherwise. -->

The Wix Media API provides the functionality to manage media files and folders in a site's Media Manager.

With the Wix Media API, you can:

- Manage folders and files in your Media Manager.
- Generate URLs for uploading files and downloading files and folders.

Learn more about the [Media Manager](https://support.wix.com/en/article/wix-media-about-the-media-manager) and how to access it.

> **Note**:
> To get absolute URLs for Wix Media resources, including scaled and cropped images, use the [SDK Media API](https://dev.wix.com/docs/sdk/core-modules/sdk/media.md).

## Before you begin

To use the wix-media API, import `wixMedia` from the `wix-media.v2` module:

```javascript
import wixMedia from "wix-media.v2";
```

## Use cases

- Update a file's display name.
- Bulk Delete Files.
- Bulk restore all non-permanently deleted images.

## Terminology

**System folders:** Folders in the Media Manager's file system directory.
There are 3 types of system folders:

- **Root Folders:** Main categories of folders the Media Manager.

  - `MEDIA_ROOT`: Contains all files and folders in the Media Manager's 'Site Files' tab in the UI.
  - `TRASH_ROOT`: Contains all files and folders in the Media Manager's 'Trash' tab in the UI.
  - `VISITOR_UPLOADS_ROOT`: Contains all files and folders created by site visitors or members.

  > **Notes:**
  >
  > - The `MEDIA_ROOT` system folder is different from the `media-root` folder of the Media Manager. The `MEDIA_ROOT` system folder contains all media in all levels of the 'Site Files' tab in the UI, while the `media-root` folder of the Media Manager contains only the media in the root level of the 'Site Files' tab in the UI. Similar relationships exist between `TRASH_ROOT` and `trash-root`, and `VISITOR_UPLOADS_ROOT` and `visitor-uploads`.
  > - The `VISITOR_UPLOADS_ROOT` folder is located in the 'Site Files' tab in the UI. However, it is its own root folder and isn't returned when searching in the `MEDIA_ROOT` folder.

- **Virtual Folders:** Special categories of folders in the Media Manager that are hidden from the UI and can't be deleted.

  - `MOBILE_UPLOADS`: Contains all media uploaded using mobile devices.
  - `PURCHASED_ITEMS`: Contains all media imported using a purchase flow.

- **Other Folders:**
  - `VIDEO_MAKER`: Contains all videos created using Wix Video Maker. Located in the 'Site Files' tab in the UI.