---
title: "Download a file"
method: GET
path: "/files/{file_id}"
tags: ["File"]
---

# Download a file

`GET /files/{file_id}`

## Request

- Base URL: `https://api.your-domain.com`
- URL: `https://api.your-domain.com/files/{file_id}`
- Auth: API key in header `X-API-KEY`
- TypeScript: <https://skmtc.dev/neulandai/apis/neuland-ai-hub-api/docs/files/:file_id/get.ts> (a function with typed inputs; its response is checked against the schema)

Stream a stored file as an attachment to authorized callers.

## Path parameters

- `file_id` integer, required

## Query parameters

- `cookie_name` string, nullable

## Response `200`

Successful Response

- unknown

## Other responses

- `401`: Missing or invalid authentication.
- `403`: Caller may not access this file.
- `404`: No file exists with the given id.
- `422`: Validation Error

---

[API](https://skmtc.dev/neulandai/apis/neuland-ai-hub-api.md) - [All operations](https://skmtc.dev/neulandai/apis/neuland-ai-hub-api/llms.txt) - [OpenAPI document](https://skmtc.dev/neulandai/apis/neuland-ai-hub-api/revisions/b53e89b98c2b?raw)
