VectorMethods

Docs / SDK

SDK setup for media workflows

Connect Python services to VideoVector indexes, prompt runs, search, imports, exports, webhooks, and automation workflows.

sdk/README.mdsdk/videovector/_config.pysdk/videovector/_http.py

Search documentation

Search pages, API reference sections, and guide headings.

Summary

Use this page to initialize the Python SDK for media ingestion, extraction, search, delivery, and automation flows, then configure credentials and runtime behavior as needed.

Installation

pip install videovector

Connect server-side workflow services

from videovector import VideoVector

with VideoVector(api_key="sk_live_...") as client:
    indexes = client.indexes.list()

Manage operator-controlled API keys

Use bearer auth for JWT-only endpoints such as client.api_keys.*.

from videovector import VideoVector

with VideoVector(bearer_token="eyJ...") as client:
    key = client.api_keys.create(name="SDK key", scopes=["read", "search"])

Configure reusable service environments

The SDK configuration layer reads:

  • VIDEO_VECTOR_API_KEY
  • VIDEO_VECTOR_BEARER_TOKEN
  • VIDEO_VECTOR_AUTH_MODE
  • VIDEO_VECTOR_BASE_URL
  • VIDEO_VECTOR_TIMEOUT
  • VIDEO_VECTOR_MAX_RETRIES
from videovector import VideoVector

with VideoVector() as client:
    results = client.search.text(index_id="idx_archive", query="station entrance")

Tune client behavior for long media jobs

The default base URL is https://playground-api-stg-udk7d32fva-uc.a.run.app/api/v2.

client = VideoVector(
    api_key="sk_live_...",
    base_url="https://playground-api-stg-udk7d32fva-uc.a.run.app/api/v2",
    timeout=90,
    max_retries=5,
)

Protect prompt-run and automation writes

The HTTP client automatically retries:

  • idempotent methods such as GET, PUT, and DELETE
  • any request that includes an explicit idempotency_key

For non-idempotent POST requests, pass an idempotency key when a retry should be safe.

run = client.prompt_runs.execute(
    prompt_id="prompt_scene_extract",
    target={"type": "index", "index_id": "idx_archive"},
    idempotency_key="prompt-run-archive-2026-04-20",
)

The same pattern applies to:

  • client.indexes.create
  • client.prompts.create
  • client.prompts.update
  • client.connectors.create_s3
  • client.import_jobs.create
  • client.exports.create_index_export
  • client.webhooks.create

Iterate through media collections

Paginated endpoints return SyncPage[T] or AsyncPage[T].

page = client.indexes.list_videos("idx_archive", limit=50)
for video in page.auto_paging_iter():
    print(video.video_id)

REST-only helper surfaces

The parity matrix explicitly calls out public endpoints that are not wrapped by the SDK, including:

  • /mcp/*
  • /processing/events/stream
  • /videos/{video_id}/gif
  • /videos/segments/{segment_id}/thumbnail

Use the REST API directly for those helper or MCP-specific surfaces.

Related documentation

API reference

The public API accepts either API keys or JWT bearer tokens for most workflow endpoints. API key management endpoints require JWT bearer auth, and `/mcp/config` requires a verified JWT session.

API keys are the primary credential for public workflow access. This guide shows how to create them, scope them, and rotate them without breaking integrations.

These examples show how the SDK maps common implementation flows directly onto the platform model, from prompt design and execution to search, connectors, imports, exports, and webhooks.