> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.withpaygent.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.withpaygent.com/_mcp/server.

# Google Veo Integration

Integrate Paygent with Google's GenAI SDK to track video generation with the Veo model.

**`veo_tracking.py`**

```python title="veo_tracking.py"
import paygent_sdk
from google import genai

# 1. Initialize Paygent
paygent_sdk.init(api_key="your-paygent-api-key")

client = genai.Client(api_key="your-gemini-api-key")

# 2. Call Veo - Paygent intercepts and tracks the duration
operation = client.models.generate_videos(
    model="veo-3.1-generate-preview",
    prompt="A space shuttle taking off in a cyberpunk world",
    config={
        "duration_seconds": 4
    },
    
    # Paygent tracking parameters
    paygent_agent_id="veo-agent",
    paygent_customer_id="user-456",
    paygent_indicator="video-generation-start"
)
```

> **Info**
>
> **Polling & Completion.** For long-running operations like video generation, Paygent tracks the **initiation** of the request. Ensure you associate the correct `paygent_agent_id` to attribute usage correctly.