Skip to main content

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


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.1.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vidcontext-0.1.0-py3-none-any.whl (14.1 kB view details)

Uploaded Python 3

File details

Details for the file vidcontext-0.1.0.tar.gz.

File metadata

  • Download URL: vidcontext-0.1.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for vidcontext-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a758f11ec48f5bfedbb63c01e5c9fac28f98b384e393e1d56d317bab89e04bb5
MD5 e31b73f1cd4f08ca12562f0072c7010c
BLAKE2b-256 da500faf445c830fd53a2b7dcb3ba79003a0815f658739a36203bc70344a952f

See more details on using hashes here.

File details

Details for the file vidcontext-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: vidcontext-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for vidcontext-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ab108b3e5be46f549bd33646f760ce733349dc639ea0c0a3081d64ab38c31a00
MD5 b557849964229164de5b5a2ea015b2ba
BLAKE2b-256 5b5833e98638b590b42e890be1a3fcc0aa09ded9c5229d4c1f2d0661b96203e1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page