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

# Download file content

`GET /v1/files/{file_id}/content`

Download the raw binary content of a file. The response includes an appropriate `Content-Type` header detected via libmagic and a `Content-Disposition: attachment` header with the original filename.

## Path parameters

- `file_id` string, required

## Query parameters

- `scope_id` string, required
- `namespace` string
- `disposition` string

## Response `200`

Raw file bytes with MIME-typed content.

- unknown

## Other responses

- `401` — Unauthorized
- `404` — File not found in the session.
- `422` — Validation Error
- `503` — Files API not configured (session namespace not set).

---

[API](https://skmtc.dev/privategpt/apis/api-reference.md) · [All operations](https://skmtc.dev/privategpt/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/privategpt/api-reference/revisions/15d9ccfd68da/schema)
