Library

Add a source to the library

Saves an uploaded source to the library so it can be listed and reused later, both here and in the editor's media panels. Create the source via POST /v1/sources and upload the bytes first, then pass its sourceId. Without this a source is only reachable through the clips that already reference it.

post/v1/library

Request body

namestring

Display name shown in the library. Defaults to the item's type.

scope'private' | 'workspace'

Which library the item belongs to: workspace items are shared with everyone in the workspace, private items are only visible to their creator

sourceIdstring required

Source ID from POST /v1/sources, with the bytes already uploaded to its uploadUrl

type'image' | 'video' | 'sound-effect'

Expected item type. Optional — the type is taken from the source's own kind; supplying a value that disagrees is an error.

Example request

{
  "name": "Intro camera take",
  "scope": "private",
  "sourceId": "su_abc123def456"
}

Response

Created

Example response

{
  "item": {
    "category": "Everyday",
    "durationMs": 4200,
    "id": "media_abc123def456",
    "name": "Intro camera take",
    "presetId": "cha-ching",
    "scope": "private",
    "sourceId": "su_abc123def456",
    "type": "video"
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.