Cloudinary icon

Cloudinary

Upload images and videos, generate images with AI from text prompts or reference images, build optimized transformation and delivery URLs, generate video players, and manage, search, tag, and edit metadata in your Cloudinary media library

Asset → Delete Assets

AI-generated

Summary

Delete one or more Cloudinary assets by their public IDs, specifying the type and resource category of the assets, with options to invalidate CDN cache, keep the original files, and delete only specific derived transformations.

Inputs

  • Public ID(s) (required) — Single or multiple public IDs of the assets to delete, either as a comma-separated string or arrays via expressions.
  • Resource Type — Type of asset being deleted: image, video, or raw. Defaults to image.
  • Type (required) — Storage type of the asset: upload, private, authenticated, or fetch.
  • Delete Options — Optional flags and parameters including whether to invalidate CDN cache, keep original assets, pagination cursor for batch deletion, and specific transformation strings to delete derived assets selectively.

Output shape

a single JSON object per execution containing details of the deletion response from Cloudinary indicating success or failure

The response may contain cursors for paginated deletions when deleting large batches. Deletion status and any errors are included in the returned data.

Examples

Example 1: Delete a single uploaded image asset with public ID 'docs/strawberry' and invalidate CDN cache

Set Public ID(s) to 'docs/strawberry', Resource Type to 'image' (default), Type to 'upload', and enable 'Invalidate CDN' option.

Example 2: Delete multiple uploaded video assets by comma-separated public IDs without CDN invalidation

Set Public ID(s) to a comma-separated list of video public IDs, Resource Type to 'video', Type to 'upload', and leave 'Invalidate CDN' disabled.

Links

Discussion