> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dataframer.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Download all generated files

> Download all generated files from a run as a single ZIP archive

<Note>
  **Async operation**: First call triggers ZIP generation with code `202`. While ZIP generation is in progress (takes a couple of seconds), this endpoint keeps returning `202`. Poll until you receive `200` with a `download_url`.
</Note>

The ZIP includes:

* All generated files with folder structure preserved
* Metadata files (`.metadata`) with evaluation classifications if available
* Top-level metadata (`top_level.metadata`) with evaluation summary


## OpenAPI

````yaml GET /api/dataframer/runs/{run_id}/files/download/
openapi: 3.0.0
info:
  title: DataFramer API
  version: 0.1.0
  description: ''
  termsOfService: https://www.aimon.ai/docs/privacy-policy.pdf
  contact:
    name: DataFramer Support
    email: info@dataframer.ai
  license:
    name: Proprietary
  x-logo:
    url: https://dataframer.ai/logo.png
    altText: DataFramer AI
  x-stainless:
    package-name: aimon-dataframer
    namespace:
      - aimon
      - dataframer
servers:
  - url: https://df-api.dataframer.ai
    description: Production server
security:
  - BearerAuth: []
tags:
  - name: Seed Datasets
    description: Manage seed datasets for generation
  - name: Specs
    description: Data specifications for sample generation
  - name: Runs
    description: Generation runs and results
  - name: Evaluations
    description: Evaluate generated sample quality
  - name: Red Teaming
    description: Security testing and adversarial prompts
  - name: Spec Creation
    description: Create specs from datasets or from scratch (seedless)
  - name: Generation
    description: Synthetic data generation
  - name: API Keys
    description: API key management and rotation
  - name: Health
    description: Health check endpoints
  - name: Models
    description: Available AI models
externalDocs:
  description: Complete API Guide
  url: https://docs.dataframer.ai/dataframer
paths:
  /api/dataframer/runs/{run_id}/files/download/:
    parameters:
      - name: run_id
        in: path
        required: true
        description: The unique identifier of the run
        schema:
          type: string
          format: uuid
    get:
      tags:
        - Runs
      summary: Download all generated files
      description: >-
        Download all generated files from a run as a single ZIP archive.


        First call triggers ZIP generation and returns 202. Poll until you
        receive 200 with a download_url.


        The ZIP includes all generated files with folder structure preserved,
        metadata files (`.metadata`) with evaluation classifications if
        available, and top-level metadata (`top_level.metadata`) with evaluation
        summary.
      operationId: api_dataframer_runs_files_download_all
      responses:
        '200':
          description: ZIP is ready for download
          content:
            application/json:
              schema:
                type: object
                properties:
                  download_url:
                    type: string
                    description: Presigned URL to download the ZIP file (valid for 1 hour)
                  size_bytes:
                    type: integer
                    description: Size of the ZIP file in bytes
              examples:
                ready:
                  value:
                    download_url: >-
                      https://s3.amazonaws.com/bucket/path/to/file.zip?signature=...
                    size_bytes: 1048576
        '202':
          description: ZIP generation in progress, poll again
          content:
            application/json:
              schema:
                type: object
                properties:
                  download_url:
                    type: string
                    nullable: true
                    description: Always null while ZIP is being generated
                  size_bytes:
                    type: integer
                    nullable: true
                    description: Always null while ZIP is being generated
              examples:
                generating:
                  value:
                    download_url: null
                    size_bytes: null
        '404':
          description: No generated files found for this run
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
              examples:
                not_found:
                  value:
                    error: No generated files found
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Dataframer from 'dataframer';

            const client = new Dataframer({
              apiKey: process.env['DATAFRAMER_API_KEY'], // This is the default and can be omitted
            });

            const response = await client.dataframer.runs.files.downloadAll(
              '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
            );

            console.log(response.download_url);
        - lang: Python
          source: |-
            import os
            from dataframer import Dataframer

            client = Dataframer(
                api_key=os.environ.get("DATAFRAMER_API_KEY"),  # This is the default and can be omitted
            )
            response = client.dataframer.runs.files.download_all(
                "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )
            print(response.download_url)
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'API Key authentication. Format: "Bearer YOUR_API_KEY"'

````