---
title: "Download an input file"
method: GET
path: "/agents/{id}/files/{file_id}"
---

# Download an input file

`GET /agents/{id}/files/{file_id}`

## Request

- Base URL: `https://api.endclose.com/v1`
- URL: `https://api.endclose.com/v1/agents/{id}/files/{file_id}`
- Auth: API key in header `X-API-KEY`

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.

## Path parameters

- `id` string, required
- `file_id` string, required

## Other responses

- `302`: Redirect to the signed download URL
- `401`: Unauthorized
- `403`: Forbidden — agent management requires a standard API key
- `404`: Agent not found, or the file is not one of this agent's input files

## Changes

- **2026-09-09** `e1526383424c`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/endclose/apis/end-close-api/changes/agents/:id/files/:file_id/get.md)

---

[API](https://skmtc.dev/endclose/apis/end-close-api.md) - [All operations](https://skmtc.dev/endclose/apis/end-close-api/llms.txt) - [OpenAPI document](https://skmtc.dev/endclose/apis/end-close-api/revisions/dfe0fde00f12?raw)
