DocsAPI referenceFiles
Download a signed output
Use the signed URL from a job response. No API key is required. Supports one byte range; links expire in at most one hour.
GET /v1/files/{id}/{alias}
Needs no API key.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id required | path | string | job_ and 24 lowercase letters and digits. |
alias required | path | string | |
account required | query | string | |
expires required | query | string | |
signature required | query | string | |
range | header | string | |
if-range | header | string | |
if-none-match | header | string |
Request
bash
# download_url is an output's download_url from the job. It needs no API key.
curl --fail-with-body -o talk-720p.mp4 "$download_url"Copy failed. The text is selected; copy it with your keyboard.
JavaScript
import { writeFile } from 'node:fs/promises';
// `output` is one of the job's outputs. Its download_url needs no API key.
const response = await fetch(output.download_url);
if (!response.ok) throw new Error(`The download returned ${response.status}`);
await writeFile(output.filename, Buffer.from(await response.arrayBuffer()));Copy failed. The text is selected; copy it with your keyboard.
Response
200 headers
HTTP/1.1 200 OK
content-type: video/mp4
content-length: 300000000
content-disposition: attachment; filename="talk-720p.mp4"
accept-ranges: bytes
etag: "5d41402abc4b2a76b9719d911017c592"
cache-control: private, no-store
(the file's bytes)Copy failed. The text is selected; copy it with your keyboard.
Responses
| Status | Body | When |
|---|---|---|
| 200 | none | The output bytes, as an attachment. |
| 206 | none | The requested byte range. |
| 304 | none | ETag has not changed. |
| 403 | Problem | permission_denied (link_invalid) |
| 404 | Problem | not_found (file) |
| 410 | Problem | resource_expired (link_expired, file_expired) |
| 416 | Problem | invalid_request (range_not_satisfiable) |
| 503 | Problem | service_unavailable (temporary) |