Download a file's bytes [read]
Changed onOnly 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.
Request
- Base URLhttps://api.agentsky.dev/v1
- URLhttps://api.agentsky.dev/v1/files/{file_id}/content
- AuthHTTP bearer
Path parameters
The file id (file_…)
Headers
One byte range, e.g. bytes=1048576-
The ETag a resumed download started from
Response
The bytes, with content-type, content-disposition, Accept-Ranges and ETag
Changes
- info
added the new optional
headerrequest parameterIf-Range - info
added the new optional
headerrequest parameterRange - info
added the non-success response with the status
- info
added the non-success response with the status
- info
added the optional property
/to the response with the status - info
added the success response with the status
- info