Uploads API
Resumable browser uploads.
Your backend creates the upload; the browser sends S3 multipart parts straight to storage with the upload token, then completes it.
Create an upload
POST /v1/uploads
Call from your backend, then hand the body to the browser uploader. The asset exists at once in waiting_upload, with its playback IDs, so you can store them before the file arrives. generate asks for subtitles and chapters once the video is ready; renditions limits the ladder.
Authentication: An API key with uploads:write.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | no | A retry with the same key and request returns the first response; a different request is 422 idempotency_key_reused. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
size | integer | yes | The file size in bytes. |
playback_policy | "signed", "public" | no | The policy of the playback ID made with the asset. Default signed. |
passthrough | string | no | Your own reference; it comes back on the asset and its webhooks. |
title | string | no | One line, up to 200 characters. |
generate | Generate | no | Ask for subtitles and chapters once the video is ready; chapters imply subtitles. |
renditions | Renditions | no | The ladder rungs to encode, e.g. ["1080p", "480p"]. Rungs above the source are skipped; if none chosen fits, the largest rung that fits is encoded. Leave it out for every rung up to the source. Shown largest first. |
{
"size": 734003200,
"playback_policy": "signed",
"passthrough": "lesson_42",
"title": "Lesson 42: Sorting",
"generate": {
"subtitles": true,
"chapters": true
}
}Response 201
Created
{
"upload_id": "upl_01jx169zxgft4kq0ydjct7r5y4",
"asset_id": "ast_01jhsze3w2mhtbzr5qv1w5xy68",
"part_size": 33554432,
"part_count": 22,
"upload_token": "M4XQ7R2VK6WT5ZJYBNC3D4F7GH",
"playback_ids": [
{
"id": "pid_01j88d4vyy93fwe7p3aqr8kcqz",
"policy": "signed",
"playable": true,
"status": "active"
}
]
}Errors
| Status | Code |
|---|---|
| 400 | invalid_request |
| 401 | unauthorized |
| 403 | insufficient_scope |
| 409 | idempotency_in_progress |
| 413 | too_large |
| 422 | idempotency_key_reused |
| 429 | rate_limited |
Sign part URLs
POST /v1/uploads/{id}/parts
Up to 100 part numbers at a time. PUT each part's bytes to its URL before expires_at, and keep the ETag storage returns for each.
Authentication: The upload's upload_token.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
part_numbers | array of integer | yes |
{
"part_numbers": [
1,
2,
3
]
}Response 200
Signed URLs; PUT each part and keep its ETag
{
"parts": [
{
"part_number": 1,
"url": "https://storage.example.com/...&partNumber=1&..."
}
],
"expires_at": "2026-11-18T10:30:00Z"
}Errors
| Status | Code |
|---|---|
| 400 | invalid_request |
| 401 | unauthorized |
| 403 | insufficient_scope |
| 403 | upload_mismatch |
| 404 | not_found |
| 409 | upload_not_active |
| 409 | upload_expired |
| 429 | rate_limited |
List stored parts, for resuming
GET /v1/uploads/{id}/parts
The parts storage already holds, so an upload can resume after a dropped connection or a closed tab.
Authentication: The upload's upload_token.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Response 200
Parts storage holds
{
"parts": [
{
"part_number": 1,
"etag": "\"9b2cf535f27731c974343645a3985328\"",
"size": 33554432
}
]
}Errors
| Status | Code |
|---|---|
| 400 | invalid_request |
| 401 | unauthorized |
| 403 | insufficient_scope |
| 404 | not_found |
| 429 | rate_limited |
Complete an upload
POST /v1/uploads/{id}/complete
Send every part's number and ETag. The asset moves to processing, and encoding starts.
Authentication: The upload's upload_token.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
parts | array of object | yes |
{
"parts": [
{
"part_number": 1,
"etag": "\"9b2cf535f27731c974343645a3985328\""
}
]
}Response 200
The asset, processing
{
"id": "ast_01jhsze3w2mhtbzr5qv1w5xy68",
"app_id": "app_01j6hrm8vmt8f27hd13py42rdc",
"status": "processing",
"version": 2,
"passthrough": "lesson_42",
"title": "Lesson 42: Sorting",
"base_url": "https://media.example.com",
"playback_ids": [
{
"id": "pid_01j88d4vyy93fwe7p3aqr8kcqz",
"policy": "signed",
"playable": true,
"status": "active"
}
],
"duration_seconds": null,
"tracks": [],
"created_at": "2026-11-18T09:30:00Z",
"updated_at": "2026-11-18T09:30:00Z"
}Errors
| Status | Code |
|---|---|
| 400 | invalid_request |
| 400 | invalid_parts |
| 401 | unauthorized |
| 403 | insufficient_scope |
| 403 | upload_mismatch |
| 404 | not_found |
| 409 | upload_not_active |
| 409 | upload_expired |
| 409 | upload_missing |
| 409 | size_mismatch |
| 429 | rate_limited |
Cancel an upload
POST /v1/uploads/{id}/cancel
Stops the upload. The asset becomes errored with error_code upload_cancelled. Takes the upload token or an API key with uploads:write.
Authentication: The upload's upload_token, or An API key with uploads:write.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Response 200
The asset, errored with upload_cancelled
{
"id": "ast_01jhsze3w2mhtbzr5qv1w5xy68",
"app_id": "app_01j6hrm8vmt8f27hd13py42rdc",
"status": "errored",
"version": 2,
"passthrough": "lesson_42",
"title": "Lesson 42: Sorting",
"base_url": "https://media.example.com",
"playback_ids": [
{
"id": "pid_01j88d4vyy93fwe7p3aqr8kcqz",
"policy": "signed",
"playable": true,
"status": "active"
}
],
"duration_seconds": null,
"tracks": [],
"created_at": "2026-11-18T09:30:00Z",
"updated_at": "2026-11-18T09:30:00Z",
"error_code": "upload_cancelled"
}Errors
| Status | Code |
|---|---|
| 400 | invalid_request |
| 401 | unauthorized |
| 403 | insufficient_scope |
| 404 | not_found |
| 429 | rate_limited |