Uploads
Send source files for jobs, from small images to large videos.
Jobs work on files you've uploaded first. You upload the file, get back a reference to it, and pass that reference when you start the job.
Choose a method
| Method | Use it for | How |
|---|---|---|
| Direct upload | Files up to about 100 MB | multipart/form-data request to the product's upload endpoint. |
| Presigned multipart upload | Files over 100 MB | Start the upload, PUT each part straight to storage, then complete it. |
| From existing assets | Files already in your organization's Drive | Pass the asset IDs. Nothing is uploaded again. |
| From a URL | Files already online (image translation) | Pass sourceUrl instead of a file. |
Why 100 MB?
A direct upload streams the whole file through the API in one request, so a dropped connection means starting again. Multipart sends 10 MB parts straight to storage, and you can retry a single part.
Direct upload
For Video Dubbing, send one or more files in the files form field:
/v1/galaxy/translate-video/upload
curl -X POST {{API_BASE_URL}}/v1/galaxy/translate-video/upload \
-H "x-api-key: uvk_YOUR_API_KEY" \
-F "files=@launch.mp4"{
"uploads": [
{
"id": "4c7e2a90-…",
"originalName": "launch.mp4",
"fileKey": "…/launch.mp4",
"url": null,
"mediaType": "video",
"mimeType": "video/mp4",
"extension": "mp4",
"sizeBytes": 48213044,
"status": "uploaded"
}
]
}Keep each upload's id and fileKey. You pass them as files: [{ "id": "…", "fileKey": "…" }] when you start the job.
Large files: presigned multipart
For Video Dubbing:
Start the upload
POST/v1/galaxy/translate-video/upload/multipart/initSend each file's name, type and size. The response gives you an uploadId, the partSizeBytes to split the file by (10 MB), and a presigned uploadUrl for each part.
{ "files": [{ "originalname": "launch.mp4", "mimetype": "video/mp4", "sizeBytes": 524288000 }] }Upload each part
PUT each part of the file to its URL and keep the ETag header from each response. These requests go straight to storage, so don't send your API key with them.
Complete the upload
POST/v1/galaxy/translate-video/upload/multipart/completeSend the uploadId, each part's number with the ETag header storage returned for it, and the SHA-256 checksum of the whole file (64 hex characters). The response describes the stored file: pass its id and fileKey when you start the job. If something goes wrong part-way, call multipart/abort with the uploadId to clean up.
{
"uploads": [
{
"uploadId": "b51f0c3e-…",
"parts": [
{ "partNumber": 1, "etag": "\"9b2cf535f27731c974343645a3985328\"" },
{ "partNumber": 2, "etag": "\"6f5902ac237024bdd0c176cb93063dc4\"" }
],
"checksum": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
}
]
}Size limits
Limits are set per endpoint, and the reference lists each one. Some common ones:
| Endpoint | Limit |
|---|---|
| Any JSON or form body | 25 MB |
| Image translation upload | 10 MB |
| Voice clone sample | 100 MB |
| Lip-sync video | 1,000 MB |