cURL
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" } }
Create a new collection to organize videos
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}")
c-
c-a1b2c3d4
is_public=True
API key for authentication (sk-xxx format)
"My New Collection"
"Collection for my videos"
false
Collection created
true
Show child attributes