Skip to main content
POST
/
collection
Create new collection
curl --request POST \
  --url https://api.videodb.io/collection \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "name": "My New Collection",
  "description": "Collection for my videos",
  "is_public": false
}
'
{
  "success": true,
  "data": {
    "id": "default",
    "name": "My Collection",
    "description": "Collection description",
    "is_public": false,
    "owner": "u-12345",
    "created_at": "2023-11-07T05:31:56Z"
  }
}
Collections organize your media files and provide a scope for search and other operations.
import videodb

conn = videodb.connect(api_key="your_api_key")
coll = conn.create_collection(
    name="Product Demos",
    description="Demo videos for Q1 2024"
)
print(f"Created collection: {coll.id}")
  • Collection IDs have a c- prefix (e.g., c-a1b2c3d4)
  • Use is_public=True to make collections accessible via ID without authentication
  • Each account has a “default” collection created automatically

Authorizations

x-access-token
string
header
required

API key for authentication (sk-xxx format)

Body

application/json
name
string
Example:

"My New Collection"

description
string
Example:

"Collection for my videos"

is_public
boolean
Example:

false

Response

200 - application/json

Collection created

success
boolean
Example:

true

data
object