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

# File Download



## OpenAPI

````yaml https://api.notte.cc/openapi.json get /storage/{session_id}/downloads/{filename}
openapi: 3.1.0
info:
  title: Notte API
  description: >-
    Notte API is a REST API that allows you to interact with Notte. It is used
    to create cloud browser sessions, scrape webpages, and run web ai agents to
    act on your behalf on the internet.
  version: 1.4.40
  x-logo:
    url: https://www.notte.cc/images/logo/logo-white.png
servers: []
security: []
tags:
  - name: agents
    description: Web AI agents (start, stop, status, replay, etc.)
  - name: sessions
    description: Session management (start, stop, status, etc.)
  - name: debug
    description: Session debugging tools (replay,logs, recording, etc.)
  - name: page
    description: Page operations withing a session (observe, step, scrape, etc.)
  - name: storage
    description: File storage interface (upload, download, list, etc.)
  - name: network
    description: Network requests/responses withing a session (intercept, etc.)
  - name: vaults
    description: >-
      Vault & Credentials management (create/delete vaults, create/delete
      credentials, etc.)
  - name: personas
    description: Persona management (create, delete, list emails, list sms, etc.)
  - name: scrape
    description: >-
      Webpage scraping (scrape, screenshot, etc.) with automatic session
      management.
  - name: health
    description: Health check endpoint.
  - name: usage
    description: Usage logs (usage, logs, etc.)
  - name: functions
    description: Functions management (create, delete, list, etc.)
paths:
  /storage/{session_id}/downloads/{filename}:
    get:
      tags:
        - storage
      summary: File Download
      operationId: file_download
      parameters:
        - name: session_id
          in: path
          required: true
          schema:
            type: string
            title: Session Id
        - name: filename
          in: path
          required: true
          schema:
            type: string
            title: Filename
        - name: x-notte-request-origin
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Notte-Request-Origin
        - name: x-notte-sdk-version
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Notte-Sdk-Version
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/FileLinkResponse'
                  - $ref: '#/components/schemas/ExecutionResponse'
                title: >-
                  Response File Download Storage  Session Id  Downloads 
                  Filename  Get
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
      x-codeSamples:
        - lang: Python
          source: >-
            from notte_sdk import NotteClient


            client = NotteClient()

            storage = client.FileStorage()


            # Assuming you have a session with storage that has completed

            with client.Session(storage=storage) as session:
                # ... agent execution happens here ...
                pass

            # After agent execution, download created files

            downloaded_files = storage.list_downloaded_files()

            print(
                f"Files downloaded by agent: {downloaded_files}"
            )


            # Download files to a directory on your computer

            download_dir = "./downloads"  # This creates a "downloads" folder in
            your current directory

            for file_name in downloaded_files:
                _ = storage.download(
                    file_name=file_name,
                    local_dir=download_dir,
                    force=False,  # Don't overwrite existing files
                )
          label: python
        - lang: Curl
          source: >-
            curl -X GET
            "https://api.notte.cc/storage/$session_id/downloads/$filename" \

            -H "Authorization: Bearer $NOTTE_API_KEY" \

            -H "Content-Type: application/json"
          label: curl
components:
  schemas:
    FileLinkResponse:
      properties:
        url:
          type: string
          title: Url
          description: URL to download file from
      type: object
      required:
        - url
      title: FileLinkResponse
    ExecutionResponse:
      properties:
        success:
          type: boolean
          title: Success
          description: Whether the operation was successful
        message:
          type: string
          title: Message
          description: A message describing the operation
      type: object
      required:
        - success
        - message
      title: ExecutionResponse
    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
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: token

````