Skip to main content

Installation

pip install videodb

Quick Start

import videodb

# Connect using environment variable
conn = videodb.connect()

# Or pass API key directly
conn = videodb.connect(api_key="your-api-key")

Environment Variables

VariableDescription
VIDEODB_API_KEYYour API key from console.videodb.io
export VIDEODB_API_KEY="your-api-key"

Requirements

  • Python 3.8 or higher
  • Works on Linux, macOS, and Windows

Basic Usage

import videodb

conn = videodb.connect()

# Upload a video
coll = conn.get_collection()
video = coll.upload(url="https://www.youtube.com/watch?v=example")

# Index for search
video.index_spoken_words()

# Search with natural language
results = video.search("key moments")
for shot in results.shots:
    print(f"{shot.start}s: {shot.text}")

Server Side

Use the full SDK on your backend to manage sessions, run AI pipelines, and handle webhooks. Your API key should never be exposed to the browser.
# Create a capture session and generate a client token
cap = conn.create_capture_session(end_user_id="user_123")
token = conn.generate_client_token(expires_in=600)

Client Side

For real-time desktop capture, install the Capture SDK on your client application. It uses short-lived tokens instead of your API key.
pip install "videodb[capture]"

Capture SDK Overview

Learn how to integrate real-time screen, audio, and camera capture into your application

Next Steps