GET
/
files
/
{file_id}
/
download
curl --request GET \
  --url https://api.invaro.ai/api/v1/files/{file_id}/download \
  --header 'Authorization: Bearer <token>'
This response does not have an example.

Download File

GET /files/{file_id}/download

Download the original file content with preserved filename and content type. Streams file efficiently without loading into memory.

Features

  • Preserves original filename and content type
  • Efficient streaming without memory loading
  • Proper content disposition headers
  • User ownership validation

Parameters

ParameterTypeRequiredDescription
file_idstringYesUnique identifier of the file to download

Request

curl "https://api.invaro.ai/api/v1/files/72f574a0-b3d2-4a0f-8527-f542e6ea7500/download" \
  -H "Authorization: Bearer your_api_key" \
  -o "downloaded_file.pdf"

Response Headers

Content-Type: application/pdf
Content-Disposition: attachment; filename="invoice.pdf"
Content-Length: 84898

Response

The response will be the binary file content with appropriate headers set for download.

Response Headers

HeaderDescription
Content-TypeMIME type of the original file
Content-DispositionAttachment with original filename
Content-LengthFile size in bytes

Supported File Types

FormatMIME Type
PDFapplication/pdf
JPGimage/jpeg
JPEGimage/jpeg
PNGimage/png

Error Responses

  • 404 Not Found: File doesn’t exist or user doesn’t have access
  • 410 Gone: File has been deleted
  • 500 Internal Server Error: File storage issue

Try It Out

Use the interactive playground above to test the download file endpoint. You can:

  1. Add your API key in the Authorization header
  2. Enter a file ID in the path parameter (use a UUID from your uploaded files)
  3. Execute the request to download the original file

Note: The playground will show response headers, but for actual file download, use the generated curl command or your HTTP client.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

file_id
string
required

Unique identifier of the file to download

Response

200
application/pdf

File content

The response is of type file.