GET
https://api.vaelor.chat/v1/music/{id}/downloadDownloads a finished track. The endpoint responds with a 302 redirect to a short-lived signed URL that serves the audio file as an attachment, named after the track title.
Path parameters#
idstringRequiredThe track ID.
Example#
Follow redirects to save the file directly.
curl -L -o harbor-lights.mp3 \
https://api.vaelor.chat/v1/music/5f0c2d1e-7a39-4b8e-9e61-2d4f8a0b3c77/download \
-H "Authorization: Bearer $VAELOR_API_KEY"import { writeFile } from 'node:fs/promises'
const response = await fetch(`https://api.vaelor.chat/v1/music/${trackId}/download`, {
headers: { Authorization: `Bearer ${process.env.VAELOR_API_KEY}` }
})
await writeFile('harbor-lights.mp3', Buffer.from(await response.arrayBuffer()))response = requests.get(
f"https://api.vaelor.chat/v1/music/{track_id}/download",
headers={"Authorization": f"Bearer {os.environ['VAELOR_API_KEY']}"},
)
with open("harbor-lights.mp3", "wb") as file:
file.write(response.content)The signed URL expires after 1 hour. Don't store it — call this endpoint again when you need the file.
Errors#
| Status | When |
|---|---|
404 | The track doesn't exist, or it hasn't finished rendering. |