Google Cloud Vision AI API client library for building and deploying Vertex AI Vision applications
npx @tessl/cli install tessl/pypi-google-cloud-visionai@0.1.0Google Cloud Vision AI API client library for building and deploying Vertex AI Vision applications. This package provides comprehensive video analytics, streaming, and media management capabilities through six core service areas including application management, live video analysis, real-time streaming, asset warehousing, and infrastructure management.
pip install google-cloud-visionaiMain convenience package (aliases v1 APIs):
from google.cloud import visionaiStable v1 API:
from google.cloud import visionai_v1Alpha/preview API:
from google.cloud import visionai_v1alpha1Service-specific imports:
from google.cloud.visionai_v1 import (
AppPlatformClient,
LiveVideoAnalyticsClient,
StreamingServiceClient,
StreamsServiceClient,
WarehouseClient,
HealthCheckServiceClient
)from google.cloud import visionai_v1
# Create service clients with automatic authentication
app_client = visionai_v1.AppPlatformClient()
warehouse_client = visionai_v1.WarehouseClient()
streaming_client = visionai_v1.StreamingServiceClient()
# Basic application management
parent = "projects/my-project/locations/us-central1"
applications = app_client.list_applications(parent=parent)
# Basic asset management
corpus_parent = "projects/my-project/locations/us-central1"
corpora = warehouse_client.list_corpora(parent=corpus_parent)
# Using path helpers for resource names
application_path = app_client.application_path("my-project", "us-central1", "my-app")
corpus_path = warehouse_client.corpus_path("my-project", "us-central1", "my-corpus")Async client usage:
import asyncio
from google.cloud import visionai_v1
async def main():
async with visionai_v1.AppPlatformAsyncClient() as client:
applications = await client.list_applications(parent=parent)
asyncio.run(main())Google Cloud Vision AI is organized around six core service areas that work together to provide comprehensive video analytics capabilities:
Each service provides both synchronous and asynchronous clients with identical APIs:
ServiceClient (e.g., AppPlatformClient)ServiceAsyncClient (e.g., AppPlatformAsyncClient)Project → Location → Service Resources
├── Applications (AppPlatform)
├── Analyses/Operators/Processes (LiveVideoAnalytics)
├── Clusters → Streams → Events/Series (StreamsService)
└── Corpora → Assets → Annotations (Warehouse)All clients use Google Cloud authentication automatically via:
Complete lifecycle management for Vision AI applications including deployment, scaling, and stream input configuration.
class AppPlatformClient:
def list_applications(self, parent: str) -> Iterable[Application]: ...
def create_application(self, parent: str, application: Application) -> Operation: ...
def deploy_application(self, name: str) -> Operation: ...
def add_application_stream_input(self, name: str, application_stream_inputs: List[ApplicationStreamInput]) -> Operation: ...Real-time video analysis capabilities with custom operators, analysis definitions, and batch processing workflows.
class LiveVideoAnalyticsClient:
def list_analyses(self, parent: str) -> Iterable[Analysis]: ...
def create_analysis(self, parent: str, analysis: Analysis) -> Operation: ...
def list_operators(self, parent: str) -> Iterable[Operator]: ...
def batch_run_process(self, parent: str, requests: List[CreateProcessRequest]) -> Operation: ...Bidirectional streaming capabilities for video packets, events, and lease-based resource management.
class StreamingServiceClient:
def send_packets(self, requests: Iterator[SendPacketsRequest]) -> Iterator[SendPacketsResponse]: ...
def receive_packets(self, requests: Iterator[ReceivePacketsRequest]) -> Iterator[ReceivePacketsResponse]: ...
def acquire_lease(self, session: str, owner: str, term: Duration) -> Lease: ...Infrastructure management for clusters, streams, events, and time series data organization.
class StreamsServiceClient:
def create_cluster(self, parent: str, cluster: Cluster) -> Operation: ...
def create_stream(self, parent: str, stream: Stream) -> Operation: ...
def create_event(self, parent: str, event: Event) -> Operation: ...
def materialize_channel(self, parent: str, channel_id: str, channel: Channel) -> Operation: ...Comprehensive media asset management with AI-powered analysis, indexing, search, and collection organization.
class WarehouseClient:
def create_asset(self, parent: str, asset: Asset) -> Asset: ...
def analyze_asset(self, name: str) -> Operation: ...
def search_assets(self, corpus: str, criteria: List[Criteria]) -> Iterator[SearchResultItem]: ...
def index_asset(self, name: str, index: str) -> Operation: ...Service monitoring and health verification capabilities for Vision AI clusters and infrastructure components.
class HealthCheckServiceClient:
def health_check(self, cluster: str) -> HealthCheckResponse: ...Core type definitions, enums, and data structures shared across all services.
Use the stable v1 API for production applications and v1alpha1 for accessing preview features.