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

# Generate presigned download URL



## OpenAPI

````yaml https://api.specular.dev/openapi.json post /branches/{branchId}/storage/presign/download
openapi: 3.0.0
info:
  title: Specular API
  description: Backend-as-a-Service API for managing projects and branches
  version: 1.0.0
servers:
  - url: https://api.specular.dev
    description: Production server
  - url: http://localhost:3000
    description: Development server
security:
  - bearerAuth: []
paths:
  /branches/{branchId}/storage/presign/download:
    post:
      tags:
        - Storage
      summary: Generate presigned download URL
      parameters:
        - schema:
            type: string
          in: path
          name: branchId
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - key
              properties:
                key:
                  type: string
                  description: File key/path
        required: true
      responses:
        '200':
          description: Presigned URL generated
          content:
            application/json:
              schema:
                description: Presigned URL generated
                type: object
                properties:
                  url:
                    type: string
                  expiresAt:
                    type: string
                    format: date-time
        '400':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
        '500':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Bearer authentication with API key (format: Bearer sk_xxx)'

````