Assets

Get resource by public ID

GET
/v1_1/{cloud_name}/resources/{resource_type}/{type}/{public_id}

Returns the details of a single resource specified by its public ID.

Authorization

AuthorizationBasic <token>

Basic authentication using Cloudinary API Key and API Secret.

In: header

Path Parameters

cloud_name*string

The cloud name of your product environment.

resource_type*string

The type of resource (image, video, or raw).

Value in

  • "image"
  • "video"
  • "raw"
type*|||||

The delivery type of the asset.

public_id*string

The public ID of the asset.

Query Parameters

colors?boolean

Whether to include color information (predominant colors and histogram of 32 leading colors). Default: false.

Defaultfalse
media_metadata?boolean

Whether to include IPTC, XMP, and detailed Exif metadata in the response. Default: false.

Defaultfalse
faces?boolean

Whether to include a list of coordinates of detected faces. Default: false.

Defaultfalse
quality_analysis?boolean

Whether to return quality analysis scores for the image. Default: false.

Defaultfalse
accessibility_analysis?boolean

Whether to return accessibility analysis scores for the image. Default: false.

Defaultfalse
pages?boolean

Whether to report the number of pages in multi-page documents (e.g., PDF). Default: false.

Defaultfalse
phash?boolean

Whether to include the perceptual hash (pHash) of the uploaded photo for image similarity detection. Default: false.

Defaultfalse
coordinates?boolean

Whether to include previously specified custom cropping coordinates and faces coordinates. Default: false.

Defaultfalse
versions?boolean

Whether to include details of all the backed up versions of the asset. Default: false.

Defaultfalse
max_results?integer

Maximum number of derived assets to return. Default: 10.

Range1 <= value <= 500
Default10
derived_next_cursor?string

The cursor for the next page of derived assets when there are more derived images than max_results.

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1_1/my_cloud/resources/image/upload/sample"
{  "asset_id": "03a5b92135161439031d3834c04bc31b",  "public_id": "sample",  "format": "jpg",  "version": 1719304854,  "resource_type": "image",  "type": "upload",  "created_at": "2021-06-25T08:40:54Z",  "bytes": 120253,  "width": 864,  "height": 576,  "asset_folder": "",  "display_name": "sample",  "url": "http://res.cloudinary.com/cld-docs/image/upload/v1719304854/sample.jpg",  "secure_url": "https://res.cloudinary.com/cld-docs/image/upload/v1719304854/sample.jpg",  "tags": [    "flower",    "plant",    "nature"  ],  "context": {    "custom": {      "alt": "sample flower",      "caption": "beautiful flower"    }  },  "metadata": {    "approval_status_0": "status_new",    "categories_0": [      "cat_mens_clothes",      "cat_shirts",      "qzaihnfnasrzba0qrdpr"    ],    "owner_0": "Adam Adams",    "product_id_0": 12345,    "publish_date_0": "2022-02-17"  },  "last_updated": {    "access_control_updated_at": "2022-10-13T03:49:21Z",    "context_updated_at": "2022-11-10T06:05:21Z",    "metadata_updated_at": "2022-10-14T06:40:13Z",    "public_id_updated_at": "2022-12-11T05:41:21Z",    "tags_updated_at": "2022-12-14T06:09:21Z",    "updated_at": "2022-12-14T06:09:21Z"  },  "next_cursor": "041a39fc10971b9eabd4993470f6bfaf",  "derived": [    {      "transformation": "c_fill,w_100,h_100",      "format": "jpg",      "bytes": 7112,      "id": "8267a869b62a93a59248f35d7f124c1f",      "url": "http://res.cloudinary.com/cld-docs/image/upload/c_fill,w_100,h_100/v1312461204/sample.jpg",      "secure_url": "https://res.cloudinary.com/cld-docs/image/upload/c_fill,w_100,h_100/v1312461204/sample.jpg"    },    {      "transformation": "w_230,h_168,c_fit",      "format": "jpg",      "bytes": 19173,      "id": "383e22a57167445552a3cdc16f0a0c85",      "url": "http://res.cloudinary.com/cld-docs/image/upload/w_230,h_168,c_fit/v1312461204/sample.jpg",      "secure_url": "https://res.cloudinary.com/cld-docs/image/upload/w_230,h_168,c_fit/v1312461204/sample.jpg"    }  ],  "etag": "619dfd2901577eb4259f91a2c0e43dac",  "faces": [    [      98,      74,      61,      83    ],    [      140,      130,      52,      71    ]  ],  "illustration_score": 0,  "semi_transparent": false,  "grayscale": false,  "colors": [    [      "#162E02",      6.7    ],    [      "#385B0C",      6.3    ],    [      "#F3285C",      5    ],    [      "#B3CB6E",      5    ],    [      "#688F1C",      4.4    ],    [      "#324D07",      4.4    ],    [      "#8EAA34",      4.3    ],    [      "#4F6D0D",      4.2    ],    [      "#789446",      4.1    ],    [      "#DF1327",      3.9    ],    [      "#A10B12",      3.7    ],    [      "#273804",      3.4    ],    [      "#0D1802",      3.4    ],    [      "#D5E191",      3.2    ],    [      "#646E20",      3.1    ],    [      "#94AF4D",      2.9    ],    [      "#FB54A9",      2.8    ],    [      "#48570B",      2.7    ],    [      "#ACC655",      2.7    ],    [      "#FCA2D9",      2.7    ],    [      "#63110A",      2.6    ],    [      "#E9B327",      2.2    ],    [      "#6D644D",      2.1    ],    [      "#6D8D12",      2    ],    [      "#8F9F27",      1.9    ],    [      "#C3573E",      1.8    ],    [      "#CFD76E",      1.6    ],    [      "#A0B058",      1.6    ],    [      "#FCD0E9",      1.6    ],    [      "#728F2D",      1.4    ],    [      "#F958A1",      1.4    ],    [      "#D1B694",      1    ]  ],  "predominant": {    "google": [      [        "yellow",        52.9      ],      [        "pink",        13.5      ],      [        "red",        12      ],      [        "black",        10.1      ],      [        "green",        6.3      ]    ]  },  "versions": [    {      "version_id": "d214063097a43d1d1293db61a397f60f",      "version": "1312461204",      "format": "jpg",      "size": 109669,      "time": "2021-08-04T12:33:24+00:00",      "restorable": false    }  ]}