Assets

Creates an archive (ZIP or TGZ file) that contains a set of assets from your product environment.

POST
/v1_1/{cloud_name}/{resource_type}/generate_archive

Creates a downloadable ZIP or other archive format containing the specified resources.

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 for archive generation (image, video, or raw).

Value in

  • "image"
  • "video"
  • "raw"
  • "all"

Request Body

application/json

The archive generation parameters.

The archive generation parameters.

api_key?string

The API key to use for the request. This is automatically computed by the Cloudinary's SDKs.

timestamp?integer

The timestamp to use for the request in unix time. This is automatically computed by the Cloudinary's SDKs.

Formatint64
signature?string

(Required for signed REST API calls) Used to authenticate the request and based on the parameters you use in the request. When using the Cloudinary SDKs for signed requests, the signature is automatically generated and added to the request. If you manually generate your own signed POST request, you need to manually generate the signature parameter and add it to the request together with the api_key and timestamp parameters.

public_ids?array<string>

The list of public IDs to include in the archive.

Itemsitems <= 1000
tags?array<string>

Tags to filter which assets to include in the archive. Assets matching any of the specified tags are included.

Itemsitems <= 20
prefixes?array<string>

Select all assets where the public ID starts with this prefix.

Itemsitems <= 20
type?|||||

All supported delivery types.

transformations?string

The transformations to apply to the assets before including them in the archive (separated by "|").

mode?string

The method for generating and delivering the archive. Options: download - Generates and delivers the archive file without storing it create - Creates and stores the archive as a raw asset, returning URLs in the response create_and_download - Creates, stores, and delivers the archive file

Default"create"

Value in

  • "download"
  • "create"
  • "create_and_download"
target_format?string

The format of the generated archive.

Default"zip"

Value in

  • "zip"
  • "tgz"
target_public_id?string

The public ID to assign to the generated archive, or the filename of the downloaded archive file.

target_asset_folder?string

The folder in your product environment where the generated archive should be stored.

flatten_folders?boolean

Whether to flatten all files to be in the root of the archive file.

Defaultfalse
flatten_transformations?boolean

Whether to flatten the folder structure of the derived assets.

Defaultfalse
skip_transformation_name?boolean

Whether to skip adding the transformation details to the file names in the archive.

Defaultfalse
allow_missing?boolean

Whether to allow missing assets in the archive. If false, the operation will fail if any asset is not found.

Defaultfalse
expires_at?integer

("download" mode only) Unix timestamp indicating when the generated archive URL should expire.

Formatint64
use_original_filename?boolean

Whether to use the original filenames of the assets in the archive instead of public IDs (when available).

Defaultfalse
async?boolean

("create" mode only), specifies whether to generate the archive asynchronously.

Defaultfalse
notification_url?string

("create" mode only), specifies the URL to notify when the archive generation is complete.

Formaturi
target_tags?array<string>

A list of tag names to assign to the generated archive.

keep_derived?boolean

Whether to keep the derived assets used for generating the archive.

Defaultfalse
fully_qualified_public_ids?array<string>

A list of fully qualified public IDs (resource_type/type/public_id) to include in the archive.

search_expression?string

A search expression to select assets to include in the archive.

target_filename?string

The filename for the downloaded archive file. Extension must match target_format (zip or tgz).

asset_folders?array<string>|

A list of asset folder paths to include in the archive, or a single folder path string. Only available when asset folders are enabled for your account.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1_1/my_cloud/image/generate_archive" \  -H "Content-Type: application/json" \  -d '{}'
{  "asset_id": "3cd9f196fe3ee1882c0f66223bc568f9",  "public_id": "atufggsrkjjefdsy90nr.zip",  "version": 1747234673,  "version_id": "42f240f70d86aab6e9249fe5b664c237",  "signature": "689ea4a513604414f44f0d779fc7d049bbdad6d2",  "resource_type": "raw",  "created_at": "2025-05-14T14:57:53Z",  "tags": [],  "bytes": 3574651,  "type": "upload",  "etag": "47ac8d2c1b74ac107937d6e9181dd047",  "placeholder": false,  "url": "http://res.cloudinary.com/customerafdb058c4adc/raw/upload/v1747234673/atufggsrkjjefdsy90nr.zip",  "secure_url": "https://res.cloudinary.com/customerafdb058c4adc/raw/upload/v1747234673/atufggsrkjjefdsy90nr.zip",  "asset_folder": "",  "display_name": "koetjd3qrme0cfcfnjet.zip",  "resource_count": 6,  "file_count": 6}