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

---

[API](https://skmtc.net/gleanwork/apis/glean-client-api.md) · [All operations](https://skmtc.net/gleanwork/apis/glean-client-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gleanwork/glean-client-api/versions/98678e54a6c5/schema)
