Overview
Asset batches parallelize the direct upload flow: instead of presigning, uploading, and completing files one by one, you request up to 100 presigned upload slots in a single call, PUT all the files in parallel, and finalize the whole batch with one request. The flow has three steps:POST /v3/assets/direct-uploads/batches— get anasset_id+ presignedupload_urlper file.PUTeach file’s raw bytes to itsupload_url, sendingupload_headersverbatim.POST /v3/assets/complete/batches— finalize, then pollGET /v3/assets/batches/{batch_id}.
A batch holds up to 100 files. No file bytes flow through the HeyGen API — uploads go straight to S3. On completion, each file is validated and ingested independently, so one bad file does not fail the rest.
Step 1 — Create a Batch of Upload Slots
- Endpoint:
POST /v3/assets/direct-uploads/batches - Purpose: Presign up to 100 direct-to-S3 upload slots and return them synchronously with a
batch_id.
Quick Example
Response
Request Body
Each entry in
files:
Idempotency
Pass anIdempotency-Key header to make retries safe — replaying the same key returns the same batch and the same slots.
Step 2 — Upload the Files
PUT each file’s raw bytes to its upload_url, sending the returned upload_headers verbatim. Uploads are plain S3 PUTs, so you can run them in parallel from any HTTP client:
upload_url expires after expires_in_seconds — request a fresh batch if a slot lapses before you upload.
Step 3 — Complete and Poll
- Endpoint:
POST /v3/assets/complete/batches - Purpose: Finalize every uploaded file in the batch. Call once, after all PUTs return
200.
Response
202 Accepted — validation and ingestion run asynchronously per file. The call is idempotent: repeating it re-drives the same batch.
Poll GET /v3/assets/batches/{batch_id} for per-item progress:
Response
The batch read model is shared across the batch APIs, so the per-item id field is named
video_id — for asset batches it holds the asset id. Once an item is completed, that asset id is usable anywhere assets are accepted, e.g. as audio_asset_id in video creation or as an asset_id source in translation and lipsync batches.Query Parameters
The response shape matches the video batch: aggregate
status (processing, completed, or failed), total_items, counts_by_status, and a paged items array where each item carries item_index, status (queued, processing, completed, or failed), its id, and error details when failed.
Bulk Statuses
- Endpoint:
GET /v3/assets/statuses - Purpose: Check up to 100 assets in one request — across batches, or for assets uploaded individually.
Statuses are
queued, processing, completed, or failed, plus not_found for unknown or unowned ids.
