Netflix logo

Complete a multipart upload

posthttps://api.netflix.developers.gaudiolab.io/v1/assets/{assetId}/complete

Finalizes a multipart upload. Call this after every chunk has been uploaded, passing the ETag returned by each chunk's PUT. Only needed when the asset was created in multipart mode.

post/assets/{assetId}/complete
curl -X POST "https://api.netflix.developers.gaudiolab.io/v1/assets/{assetId}/complete" \
  -H "x-api-key: $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "parts": [
      {
        "partNumber": 0,
        "etag": "string"
      }
    ]
  }'
Response200
{
  "assetId": "as_7f3a9c",
  "status": "awaiting_upload",
  "fileName": "string",
  "format": "string",
  "sourceUrl": "https://...",
  "expiresAt": "2026-06-08T12:00:00Z",
  "upload": {
    "mode": "single",
    "url": "https://...",
    "chunkSize": 0,
    "parts": [
      {
        "partNumber": 0,
        "url": "https://..."
      }
    ],
    "completeUrl": "string"
  }
}

Path parameters

assetIdstringRequired

The unique identifier of the asset, returned by POST /assets. It references the uploaded media you want to process.

Headers

x-api-keyRequired

Your project API key, sent on every request. Create and manage keys in the dashboard under Settings → API Keys.

Request body

partsobject[]Required

One entry per uploaded chunk, used to assemble the final file.

partNumberintegerRequired

The 1-based index of the chunk, matching the one from the upload instruction.

etagstringRequired

The ETag value returned in the response headers of this chunk's PUT.

Response

200The upload is finalized and the asset is now ready.
assetIdstringRequired

Unique identifier for the asset. Pass it as assetId when creating a job.

statusenumRequired

Lifecycle state. awaiting_upload until the bytes are received, then ready to be used in a job, and expired after 72 hours.

Allowed values: awaiting_uploadreadyexpired

fileNamestringOptional

The file name this asset was created with.

formatstringOptional

Audio format detected from the file (e.g. wav, mp3, aac).

sourceUrlstring (uri)Optional

Presigned GET URL for the stored source audio (remote-URL assets echo the URL you provided). Returned by GET /assets/{assetId} and the multipart complete response; null on the create response since nothing is downloadable yet.

expiresAtstring (date-time)Optional

ISO 8601 timestamp at which the asset and its bytes are deleted. Assets are retained for 72 hours after upload.

uploadUploadInstructionOptional

How to deliver the file's bytes. Present only while the asset's status is awaiting_upload.

modeenumRequired

single: one PUT to url. multipart: PUT each chunk in parts, then call completeUrl. remote: nothing to do — the server is fetching your sourceUrl.

Allowed values: singlemultipartremote

urlstring (uri)Optional

Pre-signed URL to PUT the entire file to. Single mode only.

chunkSizeintegerOptional

Size in bytes to split the file into before uploading. Multipart mode only.

partsobject[]Optional

Ordered list of pre-signed URLs, one per chunk. Multipart mode only.

partNumberintegerRequired

1-based index of the chunk.

urlstring (uri)Required

Pre-signed URL to PUT this chunk to.

completeUrlstringOptional

Path to call once every chunk has been uploaded. Multipart mode only.

400The request was malformed or failed validation.
codestringRequired

A stable, machine-readable error code you can branch on.

messagestringRequired

A human-readable explanation of what went wrong.

404The requested resource does not exist or has expired.
codestringRequired

A stable, machine-readable error code you can branch on.

messagestringRequired

A human-readable explanation of what went wrong.