Skip to main content
GET
/
v2
/
files
/
{fileId}
/
download
Download File
curl --request GET \
  --url https://api.tusky.io/v2/files/{fileId}/download
Download the binary content of a file. This endpoint returns the raw file data with the appropriate Content-Type header set to the file’s MIME type. The endpoint is available at any point after upload — you do not need to wait for the file to be published. Depending on the file’s current state, the binary is served from different storage backends:
  • Before publishing — the file binary is served directly from Tusky’s scratch storage (temporary storage used during the upload and publishing pipeline).
  • After publishing — the file binary is read from the Walrus decentralized storage network. If the temporary binary has already been removed from scratch storage, Walrus becomes the sole source of the file content.
To always serve file content directly from decentralized storage — bypassing scratch storage entirely — use an Aggregator. Aggregators read exclusively from the Walrus network and are the recommended approach for production file delivery.

Path Parameters

fileId
string
required
The unique identifier of the file to download.

Response

Returns the raw binary content of the file. The response headers include:
HeaderDescription
Content-TypeThe MIME type of the file (e.g. image/png, application/pdf).
Content-LengthThe size of the file in bytes.
Content-DispositionSet to attachment; filename="<original filename>".

Example

curl https://api.tusky.io/v2/files/file_mno345pqr678/download \
  -H "Api-Key: YOUR_API_KEY" \
  --output document.pdf