Zum Inhalt
Lumean

Files, links and storage

How to get a link to an order's file, where subtitles are, and how long files are kept.

Übersetzung in Arbeit

Diese Seite ist noch nicht in Ihre Sprache übersetzt — die Fassung unten ist auf English. Text und Codebeispiele sind dieselben.

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.

FieldRuleDefaultPurpose
pathrequired, string—A string from result.files[] or result.service_files[]
downloadbooleanfalsetrue marks the link as an attachment: the file is saved under the order name (Order.name) instead of opening in a tab
number_baseinteger, 0 or 11The number that chunk numbering in the file name starts from
number_paddinginteger, 1..43The 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.

Main and service files

FieldContents
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

Die Pipeline der öffentlichen APIEinmalig: Schlüssel, Berechtigungen, Stimme, Vorlage. Für jeden Auftrag: Vorlage, Auftrag, Warten, Dateien, Link.

Einmalig

  1. SchlüsselX-API-KEY
  2. Rechteorders.write
  3. StimmeGET /voices
  4. VorlagePOST /templates

Jeder Auftrag

  1. Vorlagetemplate_id
  2. AuftragPOST /orders
  3. WartenGET /orders/{order}
  4. Dateienresult.files[]
  5. 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:

FieldMeaning
files_expire_at, retention.files.expires_atWhen 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.expiredtrue means the files are gone and no link can be issued
retention.chunks.expires_at, retention.chunks.expiredThe 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_earlytrue means the chunks will be deleted before the result, because the order was merged into a separate file
retention.chunks.reasonchunks_purged: no chunks, the result is still there. storage_expired: no files at all. null: everything is available

Achtung

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.

404storage_expiredstorage_expired — file retention period has ended
Was passiert ist

The order files were deleted. POST /storage/url for a path from result.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 is chunks_purged: only the fragments were deleted, and the result is still there.

Was jetzt zu tun ist

GET /orders/{order} still shows the paths in result.files[] after the files are deleted. files_expired (and retention.files.expired) tells you whether they are gone, and files_expire_at gives the deletion date. Deleted files cannot be restored. Download the result as soon as the order is completed. Subtitles are stored separately, in result.service_files[], and are deleted along with the other files.

Code-Seite öffnen

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.

Richtig

Download files[] and service_files[] right after completed. Before downloading an old order, check files_expired.

Falsch

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.

Diese Seite für KI

.md öffnenllm.md

Aktualisiert 18.10.2026 · API-Version 1.0.0