Download file by URI (with redirect)
Download a file by resolving its gs:// storage URI.
This endpoint provides a convenient way to download files directly using curl or wget. By default, it returns a 302 redirect to a pre-signed download URL.
Quick download with curl:
curl -L -H "X-API-Key: $KEY" "https://flows.super.ai/api/files/download?uri=gs://..." -o file.pdf
The -L flag tells curl to follow the redirect automatically.
Note: The URI will appear in server access logs. For sensitive files,
use the POST /api/files/resolve endpoint instead.
Authorizations
API key authentication. Include your API key in the X-API-Key header as: X-API-Key YOUR_API_KEY
Example:
JWT Bearer token authentication. Include your access token in the Authorization header as: Bearer YOUR_ACCESS_TOKEN
Example:
Query Parameters
The gs:// storage URI to download. Pass the exact URI from your task output (URL-encoded for special characters).
If true (default), returns 302 redirect to download URL. If false, returns JSON with the download URL for programmatic use.
Response
JSON response with download URL (when redirect=false)
Response containing a temporary pre-signed download URL.
The download_url can be used directly to download the file without additional authentication. URLs expire after 1 hour.
Pre-signed URL for downloading the file. Use this URL directly—no authentication headers required. Valid for 1 hour.
ISO 8601 timestamp when the download URL expires. Request a new URL after this time.
Seconds remaining until the download URL expires. Always 3600 (1 hour) for new URLs.