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

# Get File Download Url

> Generate presigned URL for downloading a file.

The URL is valid for the specified expiry time (default: 1 hour).

Args:
    file_id: File ID
    expires_in: URL expiry time in seconds (default: 3600, max: 86400)



## OpenAPI

````yaml https://www.datalab.to/openapi.json get /api/v1/files/{file_id}/download
openapi: 3.1.0
info:
  title: Datalab API
  version: 0.0.1
servers:
  - url: https://www.datalab.to
    description: Datalab API
security: []
paths:
  /api/v1/files/{file_id}/download:
    get:
      tags:
        - files
      summary: Get File Download Url
      description: |-
        Generate presigned URL for downloading a file.

        The URL is valid for the specified expiry time (default: 1 hour).

        Args:
            file_id: File ID
            expires_in: URL expiry time in seconds (default: 3600, max: 86400)
      operationId: get_file_download_url_api_v1_files__file_id__download_get
      parameters:
        - name: file_id
          in: path
          required: true
          schema:
            type: integer
            title: File Id
        - name: expires_in
          in: query
          required: false
          schema:
            type: integer
            default: 3600
            title: Expires In
        - name: wos-session
          in: cookie
          required: false
          schema:
            type: string
            title: Wos-Session
        - name: datalab_active_team
          in: cookie
          required: false
          schema:
            type: string
            title: Datalab Active Team
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FileDownloadResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    FileDownloadResponse:
      properties:
        download_url:
          type: string
          title: Download Url
          description: Presigned URL for downloading the file
        expires_in:
          type: integer
          title: Expires In
          description: URL expiry time in seconds
        file_id:
          type: integer
          title: File Id
          description: File ID
        original_filename:
          type: string
          title: Original Filename
          description: Original filename
      type: object
      required:
        - download_url
        - expires_in
        - file_id
        - original_filename
      title: FileDownloadResponse
      description: Response with presigned download URL.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key

````