Skip to content

Large uploads

When your media lives on local disk rather than a public HTTPS URL, upload it to temporary staging first and pass the returned inputUrl to POST /v1/jobs. The Splixir CLI handles this automatically and switches to multipart upload for files over 50 MiB. See Pricing and limits for tier file caps.

Use POST /v1/uploads/presign for files up to 50 MiB. Splixir returns a uploadUrl (valid for 900 seconds), a temporary inputUrl (valid for 3600 seconds), and requiredHeaders (Content-Type and Content-Length).

Terminal window
# 1. Request presigned URLs
curl -X POST https://api.splixir.com/v1/uploads/presign \
-H "Authorization: Bearer $SPLIXIR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"filename": "clip.mp4", "contentType": "video/mp4", "bytes": 12345678}'
# 2. Upload file bytes to uploadUrl
curl -X PUT "$UPLOAD_URL" \
-H "Content-Type: video/mp4" \
--data-binary @./clip.mp4
# 3. Submit job with inputUrl
curl -X POST https://api.splixir.com/v1/jobs \
-H "Authorization: Bearer $SPLIXIR_API_KEY" \
-H "Content-Type: application/json" \
-d "{\"kind\": \"video\", \"input\": \"$INPUT_URL\", \"operations\": [{\"type\": \"transcode\", \"codec\": \"h264\", \"container\": \"mp4\"}]}"

Use multipart uploads for files over 50 MiB up to 10 GiB. Part sizes range from 5 MiB to 500 MiB (default 100 MiB), with up to 100 parts per session and a 24-hour session lifetime.

  1. Create the upload session

    Call POST /v1/uploads/multipart/create with filename, contentType, kind, declaredBytes, and optional partSizeBytes. Splixir returns uploadId, partSizeBytes, totalParts, and expiresAt.

  2. Presign part upload URLs

    Call POST /v1/uploads/multipart/:uploadId/parts with partNumbers (1 to 100). Splixir returns a signed uploadUrl for each part.

  3. Upload parts in parallel and collect ETags

    Send each slice with PUT (limiting concurrency to 3 to 5 parallel uploads) and record the ETag response header for each partNumber.

  4. Complete the upload

    Call POST /v1/uploads/multipart/:uploadId/complete with { parts: [{ partNumber, etag }] }. Splixir returns an inputUrl valid for 3600 seconds that you pass to POST /v1/jobs.

Terminal window
# 1. Create session
curl -X POST https://api.splixir.com/v1/uploads/multipart/create \
-H "Authorization: Bearer $SPLIXIR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"filename": "film.mov", "contentType": "video/quicktime", "kind": "video", "declaredBytes": 800000000, "partSizeBytes": 100000000}'
# 2. Presign parts
curl -X POST https://api.splixir.com/v1/uploads/multipart/<uploadId>/parts \
-H "Authorization: Bearer $SPLIXIR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"partNumbers": [1, 2, 3, 4, 5, 6, 7, 8]}'
# 3. Complete upload with collected ETags
curl -X POST https://api.splixir.com/v1/uploads/multipart/<uploadId>/complete \
-H "Authorization: Bearer $SPLIXIR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"parts": [{"partNumber": 1, "etag": "\"etag1\""}, {"partNumber": 2, "etag": "\"etag2\""}]}'

If an upload fails partway through and you choose not to resume, call POST /v1/uploads/multipart/:uploadId/abort with an optional reason string to discard staged parts cleanly. Completed uploads cannot be aborted.

Terminal window
curl -X POST https://api.splixir.com/v1/uploads/multipart/<uploadId>/abort \
-H "Authorization: Bearer $SPLIXIR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"reason": "Upload canceled by client"}'