---
title: "Download generated content"
url: "https://docs.api.pruna.ai/apis/models-api-0/versions/7dfbc266-0f94-4c90-8518-d9e4d1a245ec/operations/downloadContent"
---

> Full API specification: https://docs.api.pruna.ai/apis/models-api-0/versions/7dfbc266-0f94-4c90-8518-d9e4d1a245ec.md

# Download generated content

`GET` `/v1/predictions/delivery/{path}`

Operation ID: `downloadContent`

Download the generated content file. This is the third and final step in the workflow. Use the `generation_url` from the prediction status response directly - no path extraction needed. Simply make a GET request to that URL with your API key. Rate limit: 10,000 requests per minute.

## Path parameters

- `path` (string, required) - The delivery path returned in the prediction status response

## Responses

- `200` - Content file downloaded successfully
- `401` - Authentication failed
- `404` - Resource not found
- `410` - Content expired or no longer available
- `500` - Internal server error

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: P-API
  version: 0.3.0
servers:
  - url: https://api.pruna.ai
    description: Production server
paths:
  /v1/predictions/delivery/{path}:
    get:
      summary: Download generated content
      description: >
        Download the generated content file. This is the third and final

        step in the workflow.


        Use the `generation_url` from the prediction status response directly -
        no path extraction needed.

        Simply make a GET request to that URL with your API key.


        Rate limit: 10,000 requests per minute.
      operationId: downloadContent
      tags:
        - Content Delivery
      security:
        - ApiKeyAuth: []
      parameters:
        - name: path
          in: path
          required: true
          description: The delivery path returned in the prediction status response
          schema:
            type: string
            example: xezq/52UGYRrRfqViaKmvYsEnENTh0qLDAWHptQ8jOnEHu7XC6AtKA/output_42_0.jpeg
      responses:
        "200":
          description: Content file downloaded successfully
          content:
            image/jpeg:
              schema:
                type: string
                format: binary
                description: Generated image file
            image/png:
              schema:
                type: string
                format: binary
                description: Generated image file
            image/webp:
              schema:
                type: string
                format: binary
                description: Generated image file
            video/mp4:
              schema:
                type: string
                format: binary
                description: Generated video file
            application/octet-stream:
              schema:
                type: string
                format: binary
                description: Generated content file
          headers:
            Content-Type:
              description: The MIME type of the generated content
              schema:
                type: string
              example: image/jpeg
            Content-Length:
              description: The size of the file in bytes
              schema:
                type: integer
              example: 2048576
            Content-Disposition:
              description: Suggested filename for download
              schema:
                type: string
              example: attachment; filename="output_42_0.jpeg"
            Cache-Control:
              description: Caching directives
              schema:
                type: string
              example: public, max-age=3600
        "401":
          $ref: "#/components/responses/Unauthorized"
        "404":
          $ref: "#/components/responses/NotFound"
        "410":
          description: Content expired or no longer available
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
              example:
                error:
                  code: CONTENT_EXPIRED
                  message: The requested content has expired and is no longer available
                  details: Generated content is available for 24 hours after creation
        "500":
          $ref: "#/components/responses/InternalServerError"
security:
  - ApiKeyAuth: []
components:
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
          example:
            error:
              code: AUTHENTICATION_FAILED
              message: Invalid or missing API key
              details: Include your API key in the 'apikey' header
            request_id: req_1234567890
    NotFound:
      description: Resource not found
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
          example:
            error:
              code: NOT_FOUND
              message: The requested resource was not found
              details: Prediction ID does not exist or has expired
            request_id: req_1234567890
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
          example:
            error:
              code: INTERNAL_ERROR
              message: An unexpected error occurred
              details: Please try again later or contact support if the problem persists
  schemas:
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              description: Machine-readable error code
            message:
              type: string
              description: Human-readable error message
            details:
              type: string
              description: Additional error context
        request_id:
          type: string
          description: Unique request identifier for debugging
          example: req_1234567890
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apikey
      description: |
        API key for authentication. You can obtain your API key from the
        Pruna AI dashboard.

        Include it in the `apikey` header for all requests.
```
