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

# Get a file

`GET /files/{file_id}`

## Request

- Base URL: `https://api.togai.com`
- URL: `https://api.togai.com/files/{file_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/togaihq/apis/togai-apis/docs/files/:file_id/get.ts> (a function with typed inputs; its response is checked against the schema)

Get a file

## Path parameters

- `file_id` string, required

## Response `default`

Error response

- ErrorResponse
  - `message` string, required: error description

## Other responses

- `302`: Redirects to the file url
- `400`: Error response
- `401`: Error response
- `403`: Error response
- `404`: Error response
- `429`: Error response

## Changes

- **2023-11-03** `a6c96c5ec06e`: 1 info
  - endpoint added
- **2023-09-02** `6b13f6f47735`: 1 breaking
  - api path removed without deprecation

[Operation history](https://skmtc.dev/togaihq/apis/togai-apis/changes/files/:file_id/get.md)

---

[API](https://skmtc.dev/togaihq/apis/togai-apis.md) - [All operations](https://skmtc.dev/togaihq/apis/togai-apis/llms.txt) - [OpenAPI document](https://skmtc.dev/togaihq/apis/togai-apis/revisions/442f5d8f4aa0?raw)
