Files, links and storage
How to get a link to an order's file, where subtitles are, and how long files are kept.
A finished order returns its result in result.files[]. These are paths inside storage, not
links, and a GET on such a string returns nothing. Downloading takes two steps: exchange the
path for a temporary link, then download the file from that link.
Exchanging a path for a link
| Field | Rule | Default | Purpose |
|---|---|---|---|
path | required, string | — | A string from result.files[] or result.service_files[] |
download | boolean | false | true marks the link as an attachment: the file is saved under the order name (Order.name) instead of opening in a tab |
number_base | integer, 0 or 1 | 1 | The number that chunk numbering in the file name starts from |
number_padding | integer, 1..4 | 3 | The width of the chunk number, padded with leading zeros: 3 gives "007" |
POST /storage/url takes the full path, exactly as it appears in the order, and returns a
signed temporary link in data.url. It is the only operation that requires
the orders.download scope. A key with orders.read
and orders.write can see the order, but its request for a link gets a 403 with no reason
field.
The link is valid for about an hour. Download the file with a plain GET and no X-API-KEY
header: the signature is part of the URL. Don't keep the link for long; request it right before
downloading. If the link has expired, call POST /storage/url again with the same path. The
file itself is not affected.
Get File URL
Main and service files
| Field | Contents |
|---|---|
result.files[] | The main result. For text to speech after merging, one element: the final track. For music, one file for each of the n_variants |
result.service_files[] | .srt, .vtt, and .lrc subtitles, alignment, and result.json with word timings |
Both fields are flat arrays of path strings. Subtitles and alignment are only in
service_files[].
Only TTS services produce service files. The service_files key is present only when the set
is not empty. For sfx and music, the key is missing entirely: not null and not []. Check
whether the key exists.
service_files exists only on the order. GET /orders/{order}/items/{item} returns only the
chunk's own result_file.
There is no separate file type field. The type follows from the extension and from the
/service/ segment in the path. raw_chunk and metadata paths are not visible to an API key,
and requesting a link for one returns 403.
Downloading all of an order's files
Once
- KeyX-API-KEY
- Scopesorders.write
- VoiceGET /voices
- TemplatePOST /templates
Every order
- Templatetemplate_id
- OrderPOST /orders
- WaitingGET /orders/{order}
- Filesresult.files[]
- LinkPOST /storage/url
# 1. The order: paths are in result, and the status must be terminal
curl -s "$BASE/orders/$ORDER_ID" -H "X-API-KEY: $KEY"
# 2. Exchange every path from files[] and service_files[] for a link
curl -s -X POST "$BASE/storage/url" -H "X-API-KEY: $KEY" -H "Content-Type: application/json" \
-d '{ "path": "storage/501/orders/<ORDER_UUID>/output/final/result.mp3", "download": true }'
# → { "success": true, "data": { "url": "https://s3.lumean.app/…?X-Amz-Signature=…" } }
# 3. Download from data.url with a plain GET, without X-API-KEY
curl -sL -o result.mp3 "$URL"You can also download files from a partially_completed order:
the successful chunks are already finished. failed and compensated orders have no files.
Retention
Order files are deleted 7 days after the order reaches a terminal status: completed,
result_delivered, failed, compensated, or cancelled. That is the default period. If the
order was merged into a separate final file, the per-chunk tracks are deleted earlier, after
48 hours by default. GET /orders/{order} shows the deadlines:
| Field | Meaning |
|---|---|
files_expire_at, retention.files.expires_at | When all of the order's files will be deleted. null means the order is not terminal yet or the files are already gone |
files_expired, retention.files.expired | true means the files are gone and no link can be issued |
retention.chunks.expires_at, retention.chunks.expired | The deadline for per-chunk tracks. While they exist, you can edit pauses, rebuild the final file, and regenerate or retry a chunk |
retention.chunks.expires_early | true means the chunks will be deleted before the result, because the order was merged into a separate file |
retention.chunks.reason | chunks_purged: no chunks, the result is still there. storage_expired: no files at all. null: everything is available |
Warning
After the files are deleted, GET /orders/{order} still returns the paths in result.files[].
A path in the response does not mean the file exists. Check files_expired or
retention.files.expired. For a path to a deleted file, POST /storage/url returns 404.
- What happened
The order files were deleted.
POST /storage/urlfor a path fromresult.files[]returns 404{"success": false, "message": "File not found."}. The same name can also be the value of a field in the chunk preview response. The other value of that field ischunks_purged: only the fragments were deleted, and the result is still there.- What to do right now
GET /orders/{order}still shows the paths inresult.files[]after the files are deleted.files_expired(andretention.files.expired) tells you whether they are gone, andfiles_expire_atgives the deletion date. Deleted files cannot be restored. Download the result as soon as the order iscompleted. Subtitles are stored separately, inresult.service_files[], and are deleted along with the other files.
Deleted files cannot be restored. The order record remains, but the files no longer exist. The
only way to get the result again is
POST /orders/{order}/retry. It works for
orders in completed and result_delivered, creates a new order with the same parameters, and
that order is billed again.
Do
Download files[] and service_files[] right after completed. Before downloading an old
order, check files_expired.
Don't
Store paths or links as permanent addresses. A link expires within an hour, files are deleted after a week, and the path stays in the response after that.
This page for AI
Updated 10/18/2026 · API version 1.0.0