Manual Video Tracking
Use manual tracking when you have direct access to video metrics or are using a video provider that is not yet automatically patched by the SDK.
General Example
Initialize the VideoUsageData model and send it via send_usage_video().
manual_video_tracking.py
1from paygent_sdk import Client
2from paygent_sdk.models import VideoUsageData
3
4# 1. Initialize Client
5paygent = Client.new_client("your-paygent-api-key")
6
7# 2. Define Video Usage
8# Required: provider, model, video_duration_sec
9# Optional: video_resolution, video_is_audio, plan
10video_usage = VideoUsageData(
11 provider="Runway",
12 model="gen-3-alpha",
13 video_duration_sec=15.0,
14 video_resolution="1280x720",
15 video_is_audio=True
16)
17
18# 3. Send Usage
19paygent.send_usage_video(
20 agent_id="my-video-agent",
21 customer_id="customer-99",
22 indicator="video-generation-completed",
23 video_usage=video_usage
24)Was this page helpful?
Need help? Contact us at support@withpaygent.com