---
title: "Download a chat file"
method: GET
path: "/rest/api/v1/chat-files/{fileId}"
tags: ["Chat"]
---

# Download a chat file

`GET /rest/api/v1/chat-files/{fileId}`

Download the raw content of a file generated or uploaded during a chat session (for example, an image produced by the assistant). Returns the file bytes with a Content-Type header matching the file's MIME type.

## Path parameters

- `fileId` string, required

## Query parameters

- `preview` boolean

## Response `200`

File content.

## Other responses

- `400` — File ID missing from path.
- `401` — Missing or invalid API token.
- `403` — Caller does not have access to the file.
- `404` — File not found.
- `500` — Internal server error.

## Changes

- **2026-06-03** `2cb0cc06631f` — 1 info
  - the endpoint scheme security `APIToken` was added to the API
- **2026-06-03** `d2c4124e0abe` — 1 info
  - the endpoint scheme security `APIToken` was removed from the API
- **2026-05-27** `35c36b2b6d97` — 1 info
  - the endpoint scheme security `APIToken` was added to the API
- **2026-05-27** `2ed9c7b7b8d9` — 1 info
  - the endpoint scheme security `APIToken` was removed from the API
- **2026-05-21** `7e5f596e884d` — 1 info
  - the endpoint scheme security `APIToken` was added to the API

[Full history](https://skmtc.dev/gleanwork/apis/glean-api/changes/rest/api/v1/chat-files/:fileId/get.md)

---

[API](https://skmtc.dev/gleanwork/apis/glean-api.md) · [All operations](https://skmtc.dev/gleanwork/apis/glean-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gleanwork/glean-api/revisions/4cb374bdf84a/schema)
