Videos API
A video is an asset in the API: its status, playback IDs, tracks and renditions.
Find one by your own passthrough, page through changes, rename, re-encode or delete it.
Import from a URL, or attach a PC agent's local file
POST /v1/assets
Two ways to make an asset without an upload. With url, the server fetches a public http(s) URL and encodes it; a non-public or credentialed URL is 400 import_url_refused, and a fetch that fails ends errored with import_url_refused, import_failed or import_too_large. With agent_source_id, it attaches a file a PC agent registered for clipmux push --local, and its jobs run only on that agent.
Authentication: An API key with assets: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
One of these, ImportURL:
| Field | Type | Required | Description |
|---|---|---|---|
url | string (uri) | yes | |
playback_policy | "signed", "public" | no | |
passthrough | string | no | |
title | string | no | |
generate | Generate | no | |
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. |
One of these, AttachAgentSource:
| Field | Type | Required | Description |
|---|---|---|---|
agent_source_id | string | yes | |
playback_policy | "signed", "public" | no | |
passthrough | string | no | |
title | string | no | |
generate | Generate | no | |
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. |
{
"url": "https://files.example.com/lesson-42.mp4",
"playback_policy": "signed",
"passthrough": "lesson_42",
"title": "Lesson 42: Sorting"
}Response 201
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 | import_url_refused |
| 401 | unauthorized |
| 403 | insufficient_scope |
| 404 | agent_source_not_found |
| 409 | source_unavailable |
| 409 | idempotency_in_progress |
| 422 | idempotency_key_reused |
| 429 | rate_limited |
Find by passthrough, or page through changes
GET /v1/assets
With passthrough, the app's assets with that reference, newest first. With updated_since, every change since an RFC 3339 time, oldest first, deleted assets included, up to 100 a page with next_cursor: the way to catch up after missed webhooks.
Authentication: An API key with assets:read.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
passthrough | query | string | no | Your reference; newest first. |
updated_since | query | string (date-time) | no | Every change since this time, oldest first, deleted included. |
cursor | query | string | no | |
limit | query | integer | no |
Response 200
Assets
{
"data": [
{
"id": "ast_01jhsze3w2mhtbzr5qv1w5xy68",
"app_id": "app_01j6hrm8vmt8f27hd13py42rdc",
"status": "ready",
"version": 4,
"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": 1830.4,
"tracks": [
{
"id": "trk_01j0qtsj1vyp4dyn7fsdkb9t8q",
"kind": "subtitles",
"source": "generated",
"status": "ready",
"language": "en",
"name": "English"
},
{
"id": "trk_01jbz1ke29rzfnpwz5grhd401k",
"kind": "chapters",
"source": "generated",
"status": "ready"
}
],
"created_at": "2026-11-18T09:30:00Z",
"updated_at": "2026-11-18T09:34:12Z"
}
]
}Errors
| Status | Code |
|---|---|
| 400 | invalid_request |
| 400 | invalid_cursor |
| 401 | unauthorized |
| 403 | insufficient_scope |
| 429 | rate_limited |
Get an asset
GET /v1/assets/{id}
The asset, as it is now. Keep the highest version you have seen.
Authentication: An API key with assets:read.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | Asset ID (ast_…). |
Response 200
The asset
{
"id": "ast_01jhsze3w2mhtbzr5qv1w5xy68",
"app_id": "app_01j6hrm8vmt8f27hd13py42rdc",
"status": "ready",
"version": 4,
"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": 1830.4,
"tracks": [
{
"id": "trk_01j0qtsj1vyp4dyn7fsdkb9t8q",
"kind": "subtitles",
"source": "generated",
"status": "ready",
"language": "en",
"name": "English"
},
{
"id": "trk_01jbz1ke29rzfnpwz5grhd401k",
"kind": "chapters",
"source": "generated",
"status": "ready"
}
],
"created_at": "2026-11-18T09:30:00Z",
"updated_at": "2026-11-18T09:34:12Z"
}Errors
| Status | Code |
|---|---|
| 400 | invalid_request |
| 401 | unauthorized |
| 403 | insufficient_scope |
| 404 | not_found |
| 429 | rate_limited |
Change an asset's title
PATCH /v1/assets/{id}
Sets the title; "" or null clears it. A change raises version and sends video.asset.updated; the same title changes nothing.
Authentication: An API key with assets:write.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | Asset ID (ast_…). |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
title | string or null | yes |
{
"title": "Lesson 42: Sorting algorithms"
}Response 200
The asset
{
"id": "ast_01jhsze3w2mhtbzr5qv1w5xy68",
"app_id": "app_01j6hrm8vmt8f27hd13py42rdc",
"status": "ready",
"version": 5,
"passthrough": "lesson_42",
"title": "Lesson 42: Sorting algorithms",
"base_url": "https://media.example.com",
"playback_ids": [
{
"id": "pid_01j88d4vyy93fwe7p3aqr8kcqz",
"policy": "signed",
"playable": true,
"status": "active"
}
],
"duration_seconds": 1830.4,
"tracks": [
{
"id": "trk_01j0qtsj1vyp4dyn7fsdkb9t8q",
"kind": "subtitles",
"source": "generated",
"status": "ready",
"language": "en",
"name": "English"
},
{
"id": "trk_01jbz1ke29rzfnpwz5grhd401k",
"kind": "chapters",
"source": "generated",
"status": "ready"
}
],
"created_at": "2026-11-18T09:30:00Z",
"updated_at": "2026-11-18T09:34:12Z"
}Errors
| Status | Code |
|---|---|
| 400 | invalid_request |
| 401 | unauthorized |
| 403 | insufficient_scope |
| 404 | not_found |
| 409 | asset_deleted |
| 429 | rate_limited |
Delete an asset
DELETE /v1/assets/{id}
Playback stops at once. 200 once the files are gone, 202 while the delete job runs.
Authentication: An API key with assets:write.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | Asset ID (ast_…). |
Response 200
Files are gone
{
"id": "ast_01jhsze3w2mhtbzr5qv1w5xy68",
"app_id": "app_01j6hrm8vmt8f27hd13py42rdc",
"status": "deleted",
"version": 5,
"passthrough": "lesson_42",
"title": "Lesson 42: Sorting",
"base_url": "https://media.example.com",
"playback_ids": [
{
"id": "pid_01j88d4vyy93fwe7p3aqr8kcqz",
"policy": "signed",
"playable": false,
"status": "revoked"
}
],
"duration_seconds": 1830.4,
"tracks": [
{
"id": "trk_01j0qtsj1vyp4dyn7fsdkb9t8q",
"kind": "subtitles",
"source": "generated",
"status": "ready",
"language": "en",
"name": "English"
},
{
"id": "trk_01jbz1ke29rzfnpwz5grhd401k",
"kind": "chapters",
"source": "generated",
"status": "ready"
}
],
"created_at": "2026-11-18T09:30:00Z",
"updated_at": "2026-11-18T09:34:12Z"
}Response 202
The delete job runs
{
"id": "ast_01jhsze3w2mhtbzr5qv1w5xy68",
"app_id": "app_01j6hrm8vmt8f27hd13py42rdc",
"status": "deleted",
"version": 5,
"passthrough": "lesson_42",
"title": "Lesson 42: Sorting",
"base_url": "https://media.example.com",
"playback_ids": [
{
"id": "pid_01j88d4vyy93fwe7p3aqr8kcqz",
"policy": "signed",
"playable": false,
"status": "revoking"
}
],
"duration_seconds": 1830.4,
"tracks": [
{
"id": "trk_01j0qtsj1vyp4dyn7fsdkb9t8q",
"kind": "subtitles",
"source": "generated",
"status": "ready",
"language": "en",
"name": "English"
},
{
"id": "trk_01jbz1ke29rzfnpwz5grhd401k",
"kind": "chapters",
"source": "generated",
"status": "ready"
}
],
"created_at": "2026-11-18T09:30:00Z",
"updated_at": "2026-11-18T09:34:12Z"
}Errors
| Status | Code |
|---|---|
| 400 | invalid_request |
| 401 | unauthorized |
| 403 | insufficient_scope |
| 404 | not_found |
| 429 | rate_limited |
Re-encode an asset
POST /v1/assets/{id}/reencode
Encodes the source again, for example with other renditions. The current output keeps playing until the new one is ready. 409 job_active (with job_id) while another job changes the asset; supersede cancels it.
Authentication: An API key with assets:write.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes | Asset ID (ast_…). |
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 |
|---|---|---|---|
supersede | boolean | no | |
renditions | Renditions | no | Replaces the asset's choice for this output and the ones after it; leave it out to keep it. |
{
"renditions": [
"1080p",
"720p",
"480p"
]
}Response 202
Queued
{
"id": "job_01jq68ea3qk8sxe3rv83fez7sf",
"kind": "reencode",
"status": "queued"
}Errors
| Status | Code |
|---|---|
| 400 | invalid_request |
| 401 | unauthorized |
| 403 | insufficient_scope |
| 404 | not_found |
| 409 | job_active |
| 409 | source_missing |
| 409 | asset_not_ready |
| 409 | asset_deleted |
| 409 | idempotency_in_progress |
| 422 | idempotency_key_reused |
| 429 | rate_limited |