files

Download a file's bytes [read]

Changed on

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.

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

Path parameters

file_idstring required

The file id (file_…)

Headers

Rangestring

One byte range, e.g. bytes=1048576-

If-Rangestring

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 header request parameter If-Range

    • info

      added the new optional header request parameter Range

    • 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