asset_id you can reference in other endpoints — including Video Agent, Avatar creation, Video Translation, and Lipsync.
There are two ways to upload:
POST /v3/assets— a singlemultipart/form-datarequest. Simplest option, capped at 32 MB.- Direct upload — a presigned-URL flow for files larger than 32 MB. The file bytes go straight to storage and never pass through the API.
Upload via POST /v3/assets
Full schema: POST /v3/assets. Upload a file using multipart/form-data — the MIME type is auto-detected from file bytes.
Constraints
| Constraint | Value |
|---|---|
| Max file size | 32 MB — for larger files, use direct upload |
| Supported images | png, jpeg |
| Supported video | mp4, webm |
| Supported audio | mp3, wav |
| Other |
Example request
Response
| Field | Type | Description |
|---|---|---|
asset_id | string | Unique identifier to reference this file in other API calls. |
url | string | Public URL of the uploaded file. |
mime_type | string | Detected MIME type. |
size_bytes | integer | File size in bytes. |
Upload large files (direct upload)
For files larger than 32 MB, use the direct upload flow. It is a three-step process — all three steps are required; theasset_id is not usable until you call the complete endpoint:
Initialize the upload
Call
POST /v3/assets/direct-uploads with the file’s name, MIME type, and exact byte size. The response contains an asset_id, a presigned upload_url, and upload_headers.PUT the file bytes
Send the raw file bytes to
upload_url with an HTTP PUT, including every header from upload_headers verbatim. The URL expires after expires_in_seconds, and the byte size is signed into it — the upload fails if the file doesn’t match the declared size_bytes.Complete the upload
Call
POST /v3/assets/{asset_id}/complete to finalize the asset. This step is idempotent — repeated calls return the same finalized asset. The asset_id is now usable anywhere the API accepts assets.Example
Initialize response fields
| Field | Type | Description |
|---|---|---|
asset_id | string | Reusable asset identifier. Becomes usable after the complete step. |
upload_url | string | Presigned URL. PUT the raw file bytes here. |
upload_headers | object | Headers that must be sent verbatim on the PUT request. |
expires_in_seconds | integer | Seconds until upload_url expires. |
max_bytes | integer | Maximum allowed upload size in bytes for this flow. |
status | string | Always pending_upload at this stage. |
Calling complete before the
PUT has finished returns a 409 conflict (“Uploaded object not found yet”). Retry after the PUT returns 200. You can optionally pass checksum_sha256 (hex) at both the initialize and complete steps to have the stored bytes verified end to end.Use assets in Video Agent
Once uploaded, reference theasset_id in the files array when creating a video:
Three ways to provide files
Video Agent and other endpoints accept files in three formats. Use whichever is most convenient for your workflow:Asset ID
Upload once, reference by ID. Best for files you reuse across multiple videos.
HTTPS URL
Point to a publicly accessible URL. No upload step needed — HeyGen fetches the file directly. Same 32 MB per-file limit as uploads.
Base64
Inline the file content as a base64-encoded string. Useful for small files or when you want a self-contained request.
Format comparison
| Format | Syntax | When to use |
|---|---|---|
| Asset ID | { "type": "asset_id", "asset_id": "asset_..." } | Pre-uploaded files, reusable across requests. Only option for files over 32 MB (via direct upload). |
| URL | { "type": "url", "url": "https://..." } | Files up to 32 MB already hosted publicly. |
| Base64 | { "type": "base64", "media_type": "image/png", "data": "iVBOR..." } | Small files, self-contained requests, no hosting needed. |
Where assets can be used
Theasset_id format is accepted anywhere the API takes file inputs:
| Endpoint | Use case |
|---|---|
POST /v3/video-agents | Attach reference files (images, slides, video clips, audio). |
POST /v3/video-agents/{session_id} | Send additional files in follow-up messages — see Interactive Sessions. |
POST /v3/avatars | Provide a photo or video for avatar creation — see Create Avatar. |
POST /v3/video-translations | Provide source video or custom audio — see Video Translation. |
POST /v3/lipsyncs | Provide source video and/or replacement audio — see Lipsync. |

