> ## 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.

# Generate archives


You can create an archive file from assets stored in your Cloudinary storage.  The `generate_archive` method creates an archive file that contains all the assets meeting a specified tag, public ID, or prefix (or a combination thereof). The method can be used to either return the generated archive file and/or store it as a raw asset in your Cloudinary product environment that can then be delivered like any other [raw file uploaded to Cloudinary](upload_parameters#uploading_non_media_files_as_raw_files).

> **READING**: :no-icon title=Important note for free accounts

By default, while you can still use this method to generate archive files, Free accounts are blocked from delivering **ZIP**, **RAR**, **TAGZ**, and other archive formats for security reasons. For details, see [Media delivery](image_delivery_options#blocked_delivery_formats_for_security).

The Cloudinary SDKs wrap the `generate_archive` REST API method and offer the following methods: 

* [create_zip](image_upload_api_reference#create_zip_syntax): generates a ZIP file based on the specified parameter values and uploads the file to your Cloudinary product environment.
* [create_archive](image_upload_api_reference#create_archive_syntax): generates an archive file based on the specified parameter values (default target_format = zip) and uploads the file to your Cloudinary product environment. 

Instead of creating and uploading a new archive file you can generate a signed URL that expires after 1 hour. When the URL is invoked, it dynamically creates and downloads an archive file based on the given parameter values. The resulting archive file is not cached or stored in your Cloudinary product environment.

* [download_zip_url](image_upload_api_reference#download_zip_url_syntax) (`downloadZip` in Java, `DownloadArchiveUrl` in .NET): generates a signed URL for downloading a ZIP file based on the specified parameter values.
* [download_archive_url](image_upload_api_reference#download_archive_url_syntax) (`downloadArchive` in Java): generates a signed URL for downloading an archive file based on the specified parameter values (default target_format = zip).
* [download_folder](image_upload_api_reference#download_folder_syntax): generates a signed URL for downloading the contents of a specified folder (and its sub-folders) and includes all assets from the requested folder regardless of `resource_type`.

For complete details on all available options and parameters, see the [generate_archive](image_upload_api_reference#generate_archive) reference.

For example, to create a zip file that contains all images that have the `shirt` tag:

```multi
|ruby
result = Cloudinary::Uploader
.create_zip(
  tags: 'shirt', 
  resource_type: 'image')

|php_2
$result = $cloudinary->uploadApi()
->createZip([
    'tags' => 'shirt', 
    'resource_type' => 'image']);

|python
result = cloudinary.uploader\
.create_zip(
  tags = "shirt", 
  resource_type = "image")

|nodejs
cloudinary.v2.uploader
.create_zip(
  { tags: 'shirt', 
    resource_type: 'image'})
.then(result=>console.log(result));

|java
result = cloudinary.uploader()
.createZip(
  ObjectUtils.asMap(
    'tags', 'shirt', 
    'resource_type', 'image'));

|csharp
var archiveParams = new ArchiveParams(){
  ResourceType = "image",
  Tags = "shirt"};
var archiveResult = cloudinary.CreateZip(archiveParams); 

|go
resp, err := cld.Upload.CreateZip(ctx, uploader.CreateArchiveParams{
    ResourceType: "image", 
    Tags: []string{"shirt"}})

|curl
curl https://api.cloudinary.com/v1_1/demo/image/generate_archive -X POST --data 'tags=shirt&resource_type=image&timestamp=173719931&api_key=436464676&signature=a788d68f86a6f868af' 

|cli
cld uploader create_zip tags="shirt" resource_type="image"
```
