Skip to Content
API reference

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

NameInTypeRequiredDescription
Idempotency-KeyheaderstringnoA 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:

FieldTypeRequiredDescription
urlstring (uri)yes
playback_policy"signed", "public"no
passthroughstringno
titlestringno
generateGenerateno
renditionsRenditionsnoThe 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:

FieldTypeRequiredDescription
agent_source_idstringyes
playback_policy"signed", "public"no
passthroughstringno
titlestringno
generateGenerateno
renditionsRenditionsnoThe 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

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

NameInTypeRequiredDescription
passthroughquerystringnoYour reference; newest first.
updated_sincequerystring (date-time)noEvery change since this time, oldest first, deleted included.
cursorquerystringno
limitqueryintegerno

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

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

NameInTypeRequiredDescription
idpathstringyesAsset 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

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

NameInTypeRequiredDescription
idpathstringyesAsset ID (ast_…).

Request body

FieldTypeRequiredDescription
titlestring or nullyes
{
  "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

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

NameInTypeRequiredDescription
idpathstringyesAsset 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

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

NameInTypeRequiredDescription
idpathstringyesAsset ID (ast_…).
Idempotency-KeyheaderstringnoA retry with the same key and request returns the first response; a different request is 422 idempotency_key_reused.

Request body

FieldTypeRequiredDescription
supersedebooleanno
renditionsRenditionsnoReplaces 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

On this page