---
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

> 92 revisions in range; 7 could not be searched.

- **2026-07-22** `12f321ae935e` — 1 info
  - the endpoint scheme security `APIToken` was added to the API
- **2026-07-22** `90948cb39546` — 1 info
  - the endpoint scheme security `APIToken` was removed from the API
- **2026-07-21** `972a5118199e` — 1 info
  - the endpoint scheme security `APIToken` was added to the API
- **2026-07-21** `2d62172604d1` — 1 info
  - the endpoint scheme security `APIToken` was removed from the API
- **2026-06-22** `08c17c9175d0` — 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/7ed1f79f6fb7/schema)
