Download files
Signed links, formats, folders and progress.
Downloading is two steps: ask for a signed link, then fetch it. The link needs no key and expires, so treat it like a password. The SDKs do both steps in one call and write the file safely.
path = catalyst.download(song.master, "out/song.wav", format="wav") # returns the Path written
data = catalyst.download(sound, to_bytes=True) # bytes, nothing on disk
link = catalyst.url(song.master, expires_in=3600) # just the signed link
files = catalyst.download_all(song, "stems/") # master and every stemOptions
| Option | Default | What it does |
|---|---|---|
format | mp3 for audio | mp3, wav, flac, ogg, mid or midi (stems), mp4 (video). |
| destination | current folder | A file path is used exactly; a folder keeps the name <file_id>.<format>. Data is written to .part and renamed when complete, so a crash never leaves a half file. |
expires_in | 30 days | How long the link lives, in seconds: above 0, at most one year. |
expiry_date | none | An ISO 8601 date instead, for example 2026-12-01T12:00:00Z. |
disposition | attachment | attachment downloads; inline opens in a browser. |
| progress | none | A callback with bytes done and total. |
| overwrite | yes | Turn it off to refuse to replace an existing file. |
| session | the file's own | Required only for a bare file id the SDK has not returned. See Sessions. |
Warning
A signed link works for anyone who has it until it expires. Do not paste it in public places.