---
title: "Download a file's bytes [read]"
method: GET
path: "/files/{file_id}/content"
tags: ["files"]
---

# Download a file's bytes \[read\]

`GET /files/{file_id}/content`

## Request

- Base URL: `https://api.agentsky.dev/v1`
- URL: `https://api.agentsky.dev/v1/files/{file_id}/content`
- Auth: HTTP bearer

Only `downloadable` files (an image upload, readable within the workspace, and every session-scoped file: message copies, channel attachments, agent outputs); other uploads answer 400 not_downloadable. 404 once the file has expired. A file over 32 MiB answers 302 to a short-lived storage URL that serves the bytes and its own byte ranges. Otherwise a single `Range: bytes=…` answers 206 with that span, so an interrupted download resumes; `ETag` is the file's SHA-256, and an `If-Range` naming any other validator answers the whole file.

## Path parameters

- `file_id` string, required

## Headers

- `Range` string
- `If-Range` string

## Response `200`

The bytes, with content-type, content-disposition, Accept-Ranges and ETag

## Other responses

- `206`: The requested span, with Content-Range
- `302`: A file over 32 MiB: Location is a short-lived storage URL that serves its bytes
- `416`: The range starts past the end of the file; Content-Range names its size
- `default`: Error — { error: { code, message } }

## Changes

- **2026-11-02** `e5e8f0229a99`: 6 info
  - added the new optional `header` request parameter `If-Range`
  - added the new optional `header` request parameter `Range`
  - added the non-success response with the status `302`
  - added the non-success response with the status `416`
  - …2 more

[Operation history](https://skmtc.dev/agentsky/apis/agentsky-developer-api/changes/files/:file_id/content/get.md)

---

[API](https://skmtc.dev/agentsky/apis/agentsky-developer-api.md) - [All operations](https://skmtc.dev/agentsky/apis/agentsky-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentsky/apis/agentsky-developer-api/revisions/0d435187cd55?raw)
