Python SDK for the VidContext video intelligence API
Project description
vidcontext
Python SDK for the VidContext video intelligence API.
Analyze any video and get structured text output — context summaries, ad breakdowns, competitor analysis, and more.
Install
pip install vidcontext
Quick start
import vidcontext
# Uses VIDCONTEXT_API_KEY env var
result = vidcontext.analyze("video.mp4", mode="context")
print(result.result)
Async usage
from vidcontext import VidContext
async with VidContext(api_key="vc_...") as client:
result = await client.analyze("video.mp4", mode="ad")
print(result.result)
Sync usage
from vidcontext import SyncVidContext
with SyncVidContext(api_key="vc_...") as client:
result = client.analyze("video.mp4", mode="context")
print(result.result)
credit_info = client.get_credits()
print(f"Credits: {credit_info.credits}")
Fire-and-forget
job = vidcontext.submit("video.mp4", mode="editor")
print(job.job_id) # Check status later
Analysis modes
| Mode | Output |
|---|---|
context |
Scene-by-scene description for AI agents |
editor |
Shot list with timecodes for video editors |
analysis |
Deep content analysis with themes and structure |
ad |
Ad performance breakdown with scores |
ecommerce |
Product and UX analysis for online stores |
training |
Training/educational content evaluation |
ugc |
User-generated content quality assessment |
competitor |
Competitive intelligence from video content |
Account methods
with SyncVidContext() as client:
profile = client.get_profile()
credits = client.get_credits()
usage = client.get_usage()
packs = client.get_credit_packs()
keys = client.list_api_keys()
Error handling
from vidcontext import VidContextError, AuthenticationError, JobTimeoutError
try:
result = vidcontext.analyze("video.mp4")
except AuthenticationError:
print("Bad API key")
except JobTimeoutError:
print("Processing took too long")
except VidContextError as e:
print(f"API error: {e}")
Requirements
- Python 3.10+
httpx(installed automatically)
Get an API key
Sign up at vidcontext.com and go to Developer settings.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
vidcontext-0.2.0.tar.gz
(10.6 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vidcontext-0.2.0.tar.gz.
File metadata
- Download URL: vidcontext-0.2.0.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
977190002b5f5c5c19ea3bb626753e70a23dce58299a90ca0b5b1ea8aef77bf0
|
|
| MD5 |
de8962febfa98620b6481a6ce5e2bc0e
|
|
| BLAKE2b-256 |
6212da3284e29fc7139413f11f7bb4a4d1cce600feaf5a81c297ac13a2809e9c
|
File details
Details for the file vidcontext-0.2.0-py3-none-any.whl.
File metadata
- Download URL: vidcontext-0.2.0-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cfd2015ce655ec5b15044c5c36f39f73ac47345336578f6b25a6dc5ef0d44f24
|
|
| MD5 |
76a14784a6adfa1b761465c586a00a15
|
|
| BLAKE2b-256 |
7e5b866cd8c5b2346237d3dcfcba770da254777a144a2e967d67aef8d13544bf
|