Skip to navigation

Introducing Pegasus 1.5 with video segmentation

Pegasus 1.5, a new video understanding model, transforms raw videos into structured, timestamped data. Define the types of segments you want to detect, such as editorial segments, sports plays, speaker changes, or brand appearances, specify custom fields for each segment, and receive structured results in JSON format.

Instead of manually reviewing footage or relying on brittle heuristics, you can define what matters to your application and automatically extract these events across entire video libraries. For general analysis (prompt-based text generation) support, see the April 27 announcement.

Video segmentation is available through the asynchronous analysis endpoint. To use this feature, upgrade to the latest version of the Python or Node.js SDK:

pip install --upgrade twelvelabs

SDK type changes (breaking change)

The ResponseFormat type has been split into two separate types:

  • AsyncResponseFormat: Used by the asynchronous analysis endpoint (analyze_async.tasks.create). Supports both "json_schema" and "segment_definitions" response types.
  • SyncResponseFormat: Used by the synchronous analysis endpoints (analyze and analyze_stream). Supports "json_schema" only.

Update your imports when upgrading:

# Before
from twelvelabs.types import ResponseFormat
# After — for async analysis / video segmentation
from twelvelabs.types import AsyncResponseFormat
# After — for sync analysis
from twelvelabs.types import SyncResponseFormat

For a how-to guide, see the Segment videos page. For complete parameter specifications, see the Create an async analysis task page in the API Reference section.