> ## 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.
> For a full index of individual troubleshooting and tips pages across all Cloudinary products, fetch the consolidated troubleshooting index at: https://cloudinary.com/documentation/llms-troubleshooting.txt?referrer=docpage
> If your task extends beyond this product, fetch the top-level index covering all Cloudinary products and topics at: https://cloudinary.com/documentation/llms.txt?referrer=docpage

# What's the difference between an asset ID and a public ID?


Every asset in Cloudinary has two unique identifiers: a **public ID** and an **asset ID**. They aren't interchangeable. The public ID is the name you use in delivery URLs and in most API calls, while the asset ID is an immutable identifier that stays the same even if the public ID changes.

If you're looking for an asset ID in the Media Library and can't find it, that's expected: the Media Library doesn't display it as a field. This page explains how the two identifiers differ, how to retrieve the asset ID, and when to use each one.

> **NOTE**: Assets in dynamic folder mode also have a [display name](dam_manage_individual_assets#display_name), which is the name shown in the Media Library. It's a label rather than an identifier: it doesn't have to be unique, it isn't part of the delivery URL, and changing it doesn't affect either the public ID or the asset ID.

## How the two identifiers differ

{table:class=no-borders-med-first-column overview normal-font-fam}Property | Public ID | Asset ID
---|---|---
**Example value** | `products/summer-shoe` | `e115700ef8541814f391abf7fed6e1b1`
**Who sets it** | You, when you upload the asset. If you don't specify one, Cloudinary assigns a random public ID. | Cloudinary, automatically. You can't set or change it.
**Can it change?** | Yes. Renaming an asset changes its public ID, and in the legacy [fixed folder mode](folder_modes) so does moving it between folders. For the full list of reasons, see [Why has an asset's public ID changed?](ts_why_has_the_public_id_of_my_asset_changed) | No. It's immutable for the lifetime of the asset.
**Uniqueness** | Unique within the product environment for a given asset type and delivery type. The same public ID can exist for both an image and a video. | Unique within the product environment, regardless of asset type, delivery type, or public ID.
**Used in delivery URLs** | Yes. It appears at the end of the delivery URL, before the file extension. | No. You can't deliver or transform an asset by its asset ID.
**Identifies an asset on its own** | No. You need the `resource_type` (asset type) and `type` (delivery type) alongside it. | Yes. The asset ID alone identifies the asset.
**Shown in the Media Library** | Yes, in the Summary tab of the [asset drill-down page](dam_manage_individual_assets#asset_management_drill_down). | Not as a field, but it's part of the drill-down page URL. See [Find the asset ID in the Media Library](#find_the_asset_id_in_the_media_library).

## How to retrieve an asset ID

### In the upload response

Every upload response includes the `asset_id` of the newly uploaded asset, so you can store it alongside your own records at upload time:

```json
{
    "asset_id": "e115700ef8541814f391abf7fed6e1b1",
    "public_id": "products/summer-shoe",
    "version": 1719316399,
    "resource_type": "image",
    "type": "upload",
    ...
}
```

For details of the other identifiers returned, see [Identification](upload_parameters#identification).

### With the Admin API

If the asset is already in your product environment, get its details by public ID and read the `asset_id` from the response:

```multi
|curl
curl https://<API_KEY>:<API_SECRET>@api.cloudinary.com/v1_1/<cloud_name>/resources/image/upload/products/summer-shoe

|ruby
result = Cloudinary::Api
.resource('products/summer-shoe')

|php_2
$result = $api
->asset("products/summer-shoe");

|python
result = cloudinary\
.api.resource("products/summer-shoe")

|nodejs
cloudinary.v2.api
.resource('products/summer-shoe')
.then(result=>console.log(result));

|java
result = api.resource("products/summer-shoe", ObjectUtils.emptyMap());

|csharp
result = cloudinary.GetResource("products/summer-shoe");

|go
resp, err := cld.Admin.Asset(ctx, admin.AssetParams{PublicID: "products/summer-shoe"})

|cli
cld admin resource products/summer-shoe
```

See [Get details of a single resource by public ID](admin_api#get_details_of_a_single_resource_by_public_id).

To retrieve asset IDs in bulk, use the [Search API](search_method). The `asset_id` field is always included in search results, so you don't need to request it explicitly.

### Find the asset ID in the Media Library

The Media Library doesn't show the asset ID as a field in the Summary tab or as a column in List view, but it does appear in the URL of the asset's drill-down page. Double-click an asset to open its drill-down page, then take the value between `/asset/` and `/manage` from the address bar:

```
https://console.cloudinary.com/app/<...>/assets/media_library/search/asset/e115700ef8541814f391abf7fed6e1b1/manage
```

In this example, the asset ID is `e115700ef8541814f391abf7fed6e1b1`.

> **NOTE**: You can also paste an asset ID into the [Global Search](dam_global_search) bar to find the asset it belongs to, which is useful when an API response or webhook gives you an asset ID and you want to see the asset in the Media Library.

## When to use each identifier

Use the **public ID** for:

* Building delivery and transformation URLs, either directly or through an SDK.
* The majority of Upload API and Admin API calls, together with the asset type and delivery type.

Use the **asset ID** for:

* Referencing an asset from your own database or an external system, where you need an identifier that survives renaming an asset, moving it between folders, or changing its display name.
* Admin API methods that accept asset IDs, including [get resources by asset IDs](admin_api#get_resources_by_asset_ids), [get details of a single resource by asset ID](admin_api#get_details_of_a_single_resource_by_asset_id), [update details of an existing resource by asset ID](admin_api#update_details_of_an_existing_resource_by_asset_id), [restore resources by asset ID](admin_api#restore_resources_by_asset_id), [delete resources by asset ID](admin_api#delete_resources_by_asset_id), [add related assets by asset ID](admin_api#add_related_assets_by_asset_id), and [delete related assets by asset ID](admin_api#delete_related_assets_by_asset_id).
* Bulk updating [structured metadata](dam_admin_structured_metadata) from a CSV file, where the `assetId` column is an alternative to the `publicId`, `assetType`, and `deliveryType` columns.
* Using a stored image as a [reference image for image generation](image_generation_addon#generate_an_image_from_reference_images), by passing its `asset_id`.

> **READING**:
>
> * Learn about the [identifiers assigned at upload](upload_parameters#identification).

> * Learn about the [display name and public ID in the Media Library](dam_manage_individual_assets#asset_identifiers).

> * Learn why [an asset's public ID might change](ts_why_has_the_public_id_of_my_asset_changed).

> * See the definitions of [asset ID](cloudinary_glossary#asset_id) and [public ID](cloudinary_glossary#public_id) in the glossary.
