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

# Download an input file

> Redirects (302) to a short-lived signed URL for the file's bytes; follow the redirect to download. This is the API-key-authenticated way to fetch an input file. The `url` on the file object reaches the same bytes through a signed link that needs no credentials.



## OpenAPI

````yaml /openapi.json get /agents/{id}/files/{file_id}
openapi: 3.1.0
info:
  title: End Close API
  description: REST API is used to interact with the End Close platform.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.endclose.com/v1
security:
  - ApiKeyAuth: []
paths:
  /agents/{id}/files/{file_id}:
    get:
      summary: Download an input file
      description: >-
        Redirects (302) to a short-lived signed URL for the file's bytes; follow
        the redirect to download. This is the API-key-authenticated way to fetch
        an input file. The `url` on the file object reaches the same bytes
        through a signed link that needs no credentials.
      parameters:
        - in: path
          name: id
          required: true
          schema:
            type: string
          description: The unique identifier of the agent
        - in: path
          name: file_id
          required: true
          schema:
            type: string
          description: The `id` of the file from the agent's `input_files`
      responses:
        '302':
          description: Redirect to the signed download URL
        '401':
          description: Unauthorized
        '403':
          description: Forbidden — agent management requires a standard API key
        '404':
          description: Agent not found, or the file is not one of this agent's input files
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.