Skip to main content
A dub starts from an upload. Files never pass through the API itself: you send them straight to storage, or we fetch them for you. Video and audio files are both accepted, and an audio file is dubbed as audio. Your plan’s file size limit is checked when the upload starts and again when it completes. An upload can be dubbed once. To dub the same file again, upload it again.

Uploading in parts

1

Start the upload

POST /uploads with the file’s filename (with its extension) and its size in bytes. The answer gives the part_size, the part_count, and signed links for the first parts.
2

PUT each part

Send bytes (n - 1) × part_size up to n × part_size of the file to part n’s link, and keep the ETag header of each answer. Parts can go in any order and in parallel.
3

Ask for more links when you need them

The first answer has links for up to 100 parts, and each link lasts 15 minutes. POST /uploads/{id}/parts with {"part_numbers": [101, 102, …]} signs up to 100 more at a time. Ask again for any link that expired.
4

Complete the upload

POST /uploads/{id}/complete with every part number and its ETag. The upload becomes uploaded.
Parts are at least 16 MiB, and a file has at most 1,000 of them, so larger files get larger parts. Use the part_size we send rather than choosing your own.
Don’t send your API key to the signed links. An Authorization header there makes storage refuse the part.
If the file is already online, send its address instead of a filename and size:
The answer is 202 with the upload in fetching. We download the file and the upload becomes uploaded, or failed with an error saying why. Check it with GET /uploads/{id} every 10 to 30 seconds, then start the dubs as usual.
  • The link must be http or https on the standard ports and reachable from the internet. Links to private networks are refused.
  • If the link doesn’t end in a file name, add filename with the right extension.
  • Each account can have 3 links downloading at once. Past that you get 429 TOO_MANY_FETCHES.
  • A download that is very slow or stalls fails with SOURCE_URL_TOO_SLOW. Host the file somewhere faster, or upload it in parts.

Upload statuses

Uploads that are never completed expire. If completing one gives UPLOAD_GONE, start a new upload.