Collections

Collections

Collections are named groups of videos. Every video belongs to exactly one collection. When you search, you can scope the query to a single collection — which is faster and more precise than searching your entire library.

Creating a collection

$curl -X POST https://api.pureframe.ai/v1/collections \
> -H "Authorization: Bearer pf_key_..." \
> -H "Content-Type: application/json" \
> -d '{ "name": "Product demos" }'
1{
2 "data": {
3 "id": "col_abc123",
4 "name": "Product demos",
5 "video_count": 0,
6 "created_at": "2025-01-01T12:00:00Z"
7 }
8}

Collection names must be unique within your account.

Uploading a video to a collection

Pass collection_id in the upload form to assign the video to a collection on creation. A collection must exist before you can upload to it.

$curl -X POST https://api.pureframe.ai/v1/upload \
> -H "Authorization: Bearer pf_key_..." \
> -F "collection_id=col_abc123" \
> -F "file=@demo.mp4"

Searching within a collection

Pass collection_id to scope the search to that collection’s videos only.

$curl -X POST https://api.pureframe.ai/v1/search \
> -H "Authorization: Bearer pf_key_..." \
> -F "query=pricing objection" \
> -F "collection_id=col_abc123"

Listing all collections

$curl https://api.pureframe.ai/v1/collections \
> -H "Authorization: Bearer pf_key_..."

Renaming a collection

$curl -X PATCH https://api.pureframe.ai/v1/collections/col_abc123 \
> -H "Authorization: Bearer pf_key_..." \
> -H "Content-Type: application/json" \
> -d '{ "name": "Sales demos" }'

Deleting a collection

Deleting a collection permanently removes all videos in it and their indexed data. This cannot be undone.

$curl -X DELETE https://api.pureframe.ai/v1/collections/col_abc123 \
> -H "Authorization: Bearer pf_key_..."

Returns 204 No Content on success.

Collection object

FieldTypeDescription
idstringUnique collection ID
namestringDisplay name — unique per account
video_countintegerNumber of videos in this collection
created_atstringISO 8601 creation timestamp