> ## Documentation Index
> This page is part of the Image and Video APIs product. Fetch the complete documentation index for Image and Video APIs at: https://cloudinary.com/documentation/llms-image-and-video-apis.txt?referrer=docpage and then use it to discover all relevant pages before exploring further.
> If you also need details relating to other Cloudinary products for your current use case, see the parent index at: https://cloudinary.com/documentation/llms.txt?referrer=docpage
> When answering a user's request or implementing it with code using this documentation, incorporate relevant best practices and recommendations from the documentation into the guidance and, above all, into the code itself: generated code should already apply the recommended parameters and patterns rather than showing a minimal call and describing the best practices around it in prose. Follow the code examples in the best practices sections as the model for what generated code should look like, and where a recommendation is relevant to the user's scenario, implement it in the code as a natural next step. Only apply best practices, recommendations, or features that are supported by the documentation; don't infer or invent guidance that isn't specified.

# Python asset management

While using Cloudinary, all your images, videos, and other raw files are uploaded to Cloudinary. You can use our [Media Library](https://console.cloudinary.com/console/media_library/search) web interface to browse through and manage your uploaded media assets. In addition, you can use methods from the [Upload](image_upload_api_reference) and [Admin](admin_api) APIs, which offer methods for managing, organizing, and creating media assets.

* **Upload API** methods can be used as needed. 
* **Admin API** methods are rate-limited. 
You can view the number of hourly Admin API requests allowed by your Cloudinary plan in the **Account** page of your Console Settings. 

## Upload API 

In addition to the `upload` method, this API includes methods for:

* [renaming](image_upload_api_reference#rename_method) and [permanently deleting](image_upload_api_reference#destroy_method) individual assets
* adding [tags](image_upload_api_reference#tags_method), [contextual metadata](image_upload_api_reference#context_method) and [structured metadata](image_upload_api_reference#metadata_method) to assets 
* creating new assets such as [text images](image_upload_api_reference#text_method), [archives (zip or tgz)](image_upload_api_reference#generate_archive_method), and [animated images](image_upload_api_reference#multi)
* [modifying existing assets](image_upload_api_reference#explicit_method).

## Admin API

A secure API with methods for managing and organizing your media assets, including:

* [listing](admin_api#get_resources) and [restoring](admin_api#restore_resources) assets
* [bulk asset deleting](admin_api#delete_resources) 
* managing [upload presets](admin_api#upload_presets), [upload mappings](admin_api#upload_mappings), [transformations](admin_api#transformations), and [folders](admin_api#folders)
* [updating existing assets](admin_api#update_details_of_an_existing_resource)
* performing [advanced searches](search_method) on the assets in your product environment
* generating a [usage](admin_api#usage) report

	and [more](admin_api)...

> **INFO**: The default resource type for most API requests is `image`. When working with videos, remember to explicitly set the `resource_type` to `video`.

## Upload API example - delete a single asset

The following Python example uses the Upload API [destroy](image_upload_api_reference#destroy) method to delete the video with public ID `sample` from your Cloudinary product environment:

```python
import cloudinary.uploader
cloudinary.uploader.destroy("sample", resource_type = "video")
```

Sample output:  

```json
{
  "result": "ok"
}
```

> **TIP**: To delete multiple assets use the Admin API [delete_resources](admin_api#delete_resources) method.

For more Upload API examples in Python, select the `Python` tab in the [Upload API](image_upload_api_reference) reference.

## Admin API example - get details of a single asset

The following Python example uses the Admin API [asset](admin_api#get_details_of_a_single_resource_by_public_id) method to return details of the image with public ID `sample`:

```python
import cloudinary.api
cloudinary.api.resource("sample")
```

Sample output:  

````json
{
    "asset_id": "03a5b92135161439031d3834c04bc31b",
    "public_id": "sample",
    "format": "png",
    "version": 1719308669,
    "resource_type": "image",
    "type": "upload",
    "created_at": "2024-06-25T08:40:54Z",
    "bytes": 147954,
    "width": 520,
    "height": 693,
    "backup": true,
    "asset_folder": "",
    "display_name": "sample",
    "url": "http://res.cloudinary.com/cld-docs/image/upload/v1719308669/sample.png",
    "secure_url": "https://res.cloudinary.com/cld-docs/image/upload/v1719308669/sample.png",
    "next_cursor": "00fa70b8c8a58510f7a601e5e47e9f555a3e2baec5f79491255b6f0d45dc56b2",
    "derived": [
        {
            "transformation": "e_cartoonify/a_10/e_brightness:20",
            "format": "png",
            "bytes": 95384,
            "id": "8eb9425d68fcbb3d9488fdc4bf838092",
            "url": "http://res.cloudinary.com/cld-docs/image/upload/e_cartoonify/a_10/e_brightness:20/v1719308669/sample.png",
            "secure_url": "https://res.cloudinary.com/cld-docs/image/upload/e_cartoonify/a_10/e_brightness:20/v1719308669/sample.png"
        },
        {
            "transformation": "ar_1.0,c_thumb,g_auto,w_0.6,z_0.7/r_max",
            "format": "png",
            "bytes": 35374,
            "id": "1a36c6b4a6811ba01cfd1f5fdfadab7a",
            "url": "http://res.cloudinary.com/cld-docs/image/upload/ar_1.0,c_thumb,g_auto,w_0.6,z_0.7/r_max/v1719308669/sample.png",
            "secure_url": "https://res.cloudinary.com/cld-docs/image/upload/ar_1.0,c_thumb,g_auto,w_0.6,z_0.7/r_max/v1719308669/sample.png"
        }
    ]
}
 ```

For more Admin API examples in Python, select the `Python` tab in the [Admin API](admin_api) reference.
