TwelveLabs Pegasus 1.5
The TwelveLabs Pegasus 1.5 model provides comprehensive video understanding and analysis capabilities. Building on TwelveLabs Pegasus 1.2, it adds video segmentation that transforms raw video into structured, timestamped metadata across an entire video. It can analyze video content and generate textual descriptions, insights, and answers to questions about the video.
Use this information to make inference calls to TwelveLabs models with the InvokeModel and InvokeModelWithResponseStream (streaming) operations.
Provider — TwelveLabs
Categories — Video understanding, content analysis, video segmentation
Model ID —
twelvelabs.pegasus-1-5-v1:0Input modality — Video
Output modality — Text
Max video size — up to 2 hours long (less than 2 GB file size)
Note
TwelveLabs Pegasus 1.5 is available through cross-Region inference only. Use the geo inference ID (us.twelvelabs.pegasus-1-5-v1:0) or the global inference ID (global.twelvelabs.pegasus-1-5-v1:0) rather than the base model ID.
TwelveLabs Pegasus 1.5 request parameters
The following table describes the input parameters for the TwelveLabs Pegasus 1.5 model:
| Field | Type | Required | Description |
|---|---|---|---|
analysis_mode |
string | No | The analysis to perform. Valid values: general (default) returns free-form text analysis driven by inputPrompt; time_based_metadata returns structured, timestamped segments defined by segment_definitions. |
inputPrompt |
string | Conditional | Prompt to analyze the video. Required when analysis_mode is general. |
mediaSource |
object | Yes | Describes the media source. Either base64String or s3Location must be provided. |
mediaSource.base64String |
string | No | Base64 encoded byte string for the video. Max: 25 MB. For larger videos, use s3Location. |
mediaSource.s3Location.uri |
string | No | S3 URI where the video can be downloaded from. Max: up to 2 hours long (less than 2 GB file size). |
mediaSource.s3Location.bucketOwner |
string | Conditional | AWS account ID of the bucket owner. Required when s3Location is used. |
temperature |
double | No | Controls randomness in the output. Default: 0.2, Min: 0, Max: 1. |
maxOutputTokens |
integer | No | The maximum number of tokens to generate. Min: 512, Max: 98304. |
responseFormat |
object | No | Specifies a structured-output JSON Schema. Set the schema object directly under responseFormat.jsonSchema. Applies to general analysis mode. |
segment_definitions |
array | Conditional | Required when analysis_mode is time_based_metadata. Each entry defines a segment type to extract, with an id, a description, and a list of fields (each with name, type, and description) to populate per segment. |
TwelveLabs Pegasus 1.5 response fields
The following table describes the output fields for the TwelveLabs Pegasus 1.5 model:
| Field | Type | Description |
|---|---|---|
message |
string | Output message containing the model's analysis of the video. When responseFormat.jsonSchema is set, this field returns a JSON string that conforms to the supplied schema. Parse the string to access individual fields. |
stopReason |
string | Reason the output ended. Valid values: stop (the model returned the full response without reaching any limits), length (the generation reached the maxOutputTokens limit). |
segments |
array | Present when analysis_mode is time_based_metadata. The list of extracted segments, each carrying the fields declared in the matching segment_definitions entry along with its time range. |
definition_errors |
array | Present when analysis_mode is time_based_metadata. Lists any segment_definitions entries that could not be processed; empty ([]) when all definitions were applied successfully. |
finish_reason |
string | Present when analysis_mode is time_based_metadata. Returned alongside stopReason in the segmentation response and carries the same value. |
Note
TwelveLabs Pegasus 1.5 returns the stop reason in the stopReason field. This differs from TwelveLabs Pegasus 1.2, which returns finishReason. In time_based_metadata mode, the response additionally includes a finish_reason field carrying the same value alongside stopReason.
TwelveLabs Pegasus 1.5 request and response
The following examples show how to use the TwelveLabs Pegasus 1.5 model with different input sources and analysis modes.