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

The `TwelveLabs` class provides methods to analyze videos synchronously and generate text based on their content. These methods return results immediately in the response.

**When to use these methods**:

* Analyze videos up to 1 hour
* Retrieve immediate results without polling for task completion
* Stream text fragments in real time for immediate processing and feedback

**Do not use these methods for**:

* Videos longer than 1 hour. Use the [`analyze_async.tasks.create`](/v1.3/sdk-reference/python/analyze-videos/async-analysis#create-an-async-analysis-task) method instead.
* Video segmentation with custom segment definitions. Use the [`analyze_async.tasks.create`](/v1.3/sdk-reference/python/analyze-videos/async-analysis#create-an-async-analysis-task) method with `model_name` set to `"pegasus1.5"` instead.

# Sync analysis

**Description**: This method analyzes your videos and returns the results directly in the response. It generates text based on your prompts and supports both Pegasus 1.2 and Pegasus 1.5 for general analysis (prompt-based text generation).

On the Free plan, you have a total of 600 minutes (10 hours) shared across indexing, analysis, and segmentation. For details, see the [Video hours and video count limits](/v1.3/docs/concepts/indexes#video-hours-and-video-count-limits) section.

This method is rate-limited. For details, see the [Rate limits](/v1.3/docs/get-started/rate-limits) page.

**Function signature and example**:

```python Function signature
def analyze(
    self,
    *,
    model_name: typing.Optional[AnalyzeRequestModelName] = OMIT,
    video_id: typing.Optional[str] = OMIT,
    video: typing.Optional[VideoContext] = OMIT,
    prompt: typing.Optional[AnalyzeTextPrompt] = OMIT,
    prompt_v_2: typing.Optional[AnalyzePromptV2] = OMIT,
    temperature: typing.Optional[AnalyzeTemperature] = OMIT,
    response_format: typing.Optional[SyncResponseFormat] = OMIT,
    max_tokens: typing.Optional[int] = OMIT,
    start_time: typing.Optional[float] = OMIT,
    end_time: typing.Optional[float] = OMIT,
    request_options: typing.Optional[RequestOptions] = None,
) -> NonStreamAnalyzeResponse:
```

```python Python example
from twelvelabs import TwelveLabs
from twelvelabs.types import VideoContext_Url, AnalyzePromptV2, SmeMediaSource

result = client.analyze(
    model_name="pegasus1.5",
    video=VideoContext_Url(url="<YOUR_VIDEO_URL>"),
    prompt_v_2=AnalyzePromptV2(
        input_text="<YOUR_PROMPT>",  # To use reference images: "Is there a <@product> in this video?"
        # media_sources=[
        #     SmeMediaSource(name="product", media_type="image", url="<YOUR_IMAGE_URL>"),
        # ],
    ),
    temperature=0.2
)

print("Result ID:", result.id)
print(f"Generated Text: {result.data}")
if result.usage is not None:
    print(f"Output tokens: {result.usage.output_tokens}")
```

**Parameters**:

| Name              | Type                                       | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| :---------------- | :----------------------------------------- | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `model_name`      | `typing.Optional[AnalyzeRequestModelName]` | No       | The video understanding model to use for analysis. Values:<br /> - `"pegasus1.2"`: General analysis (prompt-based text generation).<br />- `"pegasus1.5"`: General analysis with video clipping, structured prompts, longer responses, and video segmentation (async only). See the [Pegasus](/v1.3/docs/concepts/models/pegasus) page for details.<br />**Default:** `"pegasus1.2"`                                                                                                                                                                                                                                                                                                                     |
| `video_id`        | `typing.Optional[str]`                     | No       | The unique identifier of the video to analyze. Use this parameter when the `model_name` parameter is `"pegasus1.2"`. Not supported with `"pegasus1.5"`. This parameter will be deprecated and removed in a future version. Use the `video` parameter instead.                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `video`           | `typing.Optional[VideoContext]`            | No       | An object specifying the source of the video content. Include exactly one source. See [VideoContext](#videocontext).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `prompt`          | `typing.Optional[str]`                     | No       | A text prompt that guides the model on the desired format or content. Works with both Pegasus 1.2 and Pegasus 1.5. To include reference images in your prompt, use the `prompt_v_2` parameter instead (Pegasus 1.5 only). Mutually exclusive with the `prompt_v_2` parameter.                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `prompt_v_2`      | `typing.Optional[AnalyzePromptV2]`         | No       | A structured prompt with `<@name>` placeholders for referencing images. Requires the `model_name` parameter set to `"pegasus1.5"`. Mutually exclusive with the `prompt` parameter. See [AnalyzePromptV2](#analyzepromptv2).                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `temperature`     | `typing.Optional[float]`                   | No       | Controls the randomness of the text output. **Default:** 0.2, **Min:** 0, **Max:** 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `start_time`      | `typing.Optional[float]`                   | No       | Start of the analysis window, as an absolute timestamp in seconds, based on the video's internal metadata. Use with `end_time` to analyze only a portion of the video. Requires `model_name` set to `"pegasus1.5"`. If omitted, defaults to the video's internal start time. Most videos start at 0, but some (for example, from cameras or broadcast recordings) may have a non-zero start time. To find the value, run `ffprobe -v error -show_entries format=start_time,duration -of default=noprint_wrappers=1 your_video.mp4`. Must be less than `end_time` and less than the video duration. The clip (`end_time` − `start_time`) must be at least `4` seconds.                                    |
| `end_time`        | `typing.Optional[float]`                   | No       | End of the analysis window, as an absolute timestamp in seconds, based on the video's internal metadata. Use with `start_time` to analyze only a portion of the video. Requires `model_name` set to `"pegasus1.5"`. If omitted, defaults to the video's internal start time plus its duration. Most videos start at 0, but some (for example, from cameras or broadcast recordings) may have a non-zero start time. To find the value, run `ffprobe -v error -show_entries format=start_time,duration -of default=noprint_wrappers=1 your_video.mp4`. Must be greater than `start_time` and less than or equal to the video duration. The clip (`end_time` − `start_time`) must be at least `4` seconds. |
| `request_options` | `typing.Optional[RequestOptions]`          | No       | Request-specific configuration.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |

The `SyncResponseFormat` class contains the following properties:

| Name          | Type                       | Description                                                                                                                                                                                                                                                                                                                                           |
| ------------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `type`        | `SyncResponseFormatType`   | The response format to use. Value: `"json_schema"` (structured JSON conforming to a provided schema).                                                                                                                                                                                                                                                 |
| `json_schema` | `Dict[str, Optional[Any]]` | Contains the JSON schema that defines the response structure. The schema must adhere to the [JSON Schema Draft 2020-12](https://json-schema.org/draft/2020-12) specification. For details, see the [`json_schema`](/v1.3/api-reference/analyze-videos/sync-analysis#request.body.response_format.json_schema) parameter in the API Reference section. |

### VideoContext

The `VideoContext` type specifies the source of the video content. Provide exactly one of the following:

| Class                       | Field           | Type  | Description                                                                                                                                                                                                                                                                                                                                                |
| --------------------------- | --------------- | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `VideoContext_Url`          | `url`           | `str` | The publicly accessible URL of the video file. Use direct links to raw media files. Video hosting platforms and cloud storage sharing links are not supported.                                                                                                                                                                                             |
| `VideoContext_AssetId`      | `asset_id`      | `str` | The unique identifier of an asset from a [direct](/v1.3/sdk-reference/python/upload-content/direct-uploads) or [multipart](/v1.3/sdk-reference/python/upload-content/multipart-uploads) upload. The asset status must be `ready`. Use [`assets.retrieve`](/v1.3/sdk-reference/python/upload-content/direct-uploads#retrieve-an-asset) to check the status. |
| `VideoContext_Base64String` | `base64_string` | `str` | The base64-encoded video data. The maximum size is 30MB.                                                                                                                                                                                                                                                                                                   |

### AnalyzePromptV2

The `AnalyzePromptV2` class defines a structured prompt with image references.

| Name            | Type                             | Required | Description                                                                                                                                                                                                                                                              |
| --------------- | -------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `input_text`    | `str`                            | Yes      | The text of the prompt. Use `<@name>` placeholders to reference images declared in `media_sources` (Example: `"Is there a <@tiger-1> in the video?"`). For Pegasus 1.5, this text counts toward the [context window](/v1.3/docs/concepts/models/pegasus#context-window). |
| `media_sources` | `Optional[List[SmeMediaSource]]` | No       | Reference images for the `<@name>` placeholders in the prompt. Maximum 4 sources. See [SmeMediaSource](#smemediasource).                                                                                                                                                 |

### SmeMediaSource

A reference image that provides visual context. Provide exactly one of `url`, `asset_id`, or `base64_string`.

| Name            | Type                      | Required | Description                                          |
| --------------- | ------------------------- | -------- | ---------------------------------------------------- |
| `name`          | `str`                     | Yes      | A descriptive name for this media source.            |
| `media_type`    | `SmeMediaSourceMediaType` | Yes      | The media type. Value: `"image"`.                    |
| `url`           | `Optional[str]`           | No       | A publicly accessible HTTPS URL of the image.        |
| `asset_id`      | `Optional[str]`           | No       | The unique identifier of an uploaded asset.          |
| `base64_string` | `Optional[str]`           | No       | Base64-encoded image data. The maximum size is 30MB. |

**Return value**: Returns a `NonStreamAnalyzeResponse` object containing the generated text.

The `NonStreamAnalyzeResponse` class contains the following properties:

| Name            | Type                            | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| --------------- | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `id`            | `Optional[str]`                 | Unique identifier of the response.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `data`          | `Optional[str]`                 | The generated text based on the prompt you provided.                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `finish_reason` | `typing.Optional[FinishReason]` | The reason the generation stopped. Values:<br /> - `null`: The generation hasn't finished yet.<br /> - `"stop"`: The generation reached the end of the output text.<br /> - `"length"`: The response reached the maximum response length or the [context window](/v1.3/docs/concepts/models/pegasus#context-window). The partial output is returned and a warning is in the `error` field. Both Pegasus 1.5 and Pegasus 1.2 report `"length"`. For JSON responses, this may return truncated JSON that fails to parse. |
| `usage`         | `Optional[TokenUsage]`          | The number of tokens used in the generation.                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |

The `TokenUsage` class contains the following properties:

| Name            | Type            | Description                                                                                                                                                                 |
| --------------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `output_tokens` | `int`           | The number of tokens in the generated text.                                                                                                                                 |
| `input_tokens`  | `Optional[int]` | The number of tokens the input consumed. Together with `output_tokens`, this value must fit within the [context window](/v1.3/docs/concepts/models/pegasus#context-window). |

**API Reference**: [Sync analysis](/v1.3/api-reference/analyze-videos/sync-analysis).

**Related guide**: [Analyze videos](/v1.3/docs/guides/analyze-videos).

# Sync analysis with streaming responses

**Description**: This method analyzes your videos and returns the results directly in the response. It generates text based on your prompts and supports both Pegasus 1.2 and Pegasus 1.5 for general analysis (prompt-based text generation).

On the Free plan, you have a total of 600 minutes (10 hours) shared across indexing, analysis, and segmentation. For details, see the [Video hours and video count limits](/v1.3/docs/concepts/indexes#video-hours-and-video-count-limits) section.

This method is rate-limited. For details, see the [Rate limits](/v1.3/docs/get-started/rate-limits) page.

**Function signature and example**:

```python Function signature
def analyze_stream(
    self,
    *,
    model_name: typing.Optional[AnalyzeStreamRequestModelName] = OMIT,
    video_id: typing.Optional[str] = OMIT,
    video: typing.Optional[VideoContext] = OMIT,
    prompt: typing.Optional[AnalyzeTextPrompt] = OMIT,
    prompt_v_2: typing.Optional[AnalyzePromptV2] = OMIT,
    temperature: typing.Optional[AnalyzeTemperature] = OMIT,
    response_format: typing.Optional[SyncResponseFormat] = OMIT,
    max_tokens: typing.Optional[int] = OMIT,
    start_time: typing.Optional[float] = OMIT,
    end_time: typing.Optional[float] = OMIT,
    request_options: typing.Optional[RequestOptions] = None,
) -> typing.Iterator[StreamAnalyzeResponse]
```

```python Python example
from twelvelabs import TwelveLabs
from twelvelabs.types import VideoContext_Url, AnalyzePromptV2, SmeMediaSource

response = client.analyze_stream(
    model_name="pegasus1.5",
    video=VideoContext_Url(url="<YOUR_VIDEO_URL>"),
    prompt_v_2=AnalyzePromptV2(
        input_text="<YOUR_PROMPT>",  # To use reference images: "Is there a <@product> in this video?"
        # media_sources=[
        #     SmeMediaSource(name="product", media_type="image", url="<YOUR_IMAGE_URL>"),
        # ],
    ),
    temperature=0.2,
)

for chunk in response:
    if hasattr(chunk, 'event_type'):
        if chunk.event_type == "stream_start":
            print("Stream started")
        elif chunk.event_type == "text_generation":
            print(chunk.text, end="")
        elif chunk.event_type == "stream_end":
            print("\nStream ended")
            if chunk.metadata:
                print(f"Metadata: {chunk.metadata}")
```

**Parameters**:

| Name              | Type                                       | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| :---------------- | :----------------------------------------- | :------- | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `model_name`      | `typing.Optional[AnalyzeRequestModelName]` | No       | The video understanding model to use for analysis. Values:<br /> - `"pegasus1.2"`: General analysis (prompt-based text generation).<br />- `"pegasus1.5"`: General analysis with video clipping, structured prompts, longer responses, and video segmentation (async only). See the [Pegasus](/v1.3/docs/concepts/models/pegasus) page for details.<br />**Default:** `"pegasus1.2"`                                                                                                                                                                                                                                                                                                                     |
| `video_id`        | `typing.Optional[str]`                     | No       | The unique identifier of the video to analyze. Use this parameter when the `model_name` parameter is `"pegasus1.2"`. Not supported with `"pegasus1.5"`. This parameter will be deprecated and removed in a future version. Use the `video` parameter instead.                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `video`           | `typing.Optional[VideoContext]`            | No       | An object specifying the source of the video content. Include exactly one source. See [VideoContext](#videocontext).                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `prompt`          | `typing.Optional[str]`                     | No       | A text prompt that guides the model on the desired format or content. Works with both Pegasus 1.2 and Pegasus 1.5. To include reference images in your prompt, use the `prompt_v_2` parameter instead (Pegasus 1.5 only). Mutually exclusive with the `prompt_v_2` parameter.                                                                                                                                                                                                                                                                                                                                                                                                                            |
| `prompt_v_2`      | `typing.Optional[AnalyzePromptV2]`         | No       | A structured prompt with `<@name>` placeholders for referencing images. Requires the `model_name` parameter set to `"pegasus1.5"`. Mutually exclusive with the `prompt` parameter. See [AnalyzePromptV2](#analyzepromptv2).                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `temperature`     | `typing.Optional[float]`                   | No       | Controls the randomness of the text output. **Default:** 0.2, **Min:** 0, **Max:** 1                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| `start_time`      | `typing.Optional[float]`                   | No       | Start of the analysis window, as an absolute timestamp in seconds, based on the video's internal metadata. Use with `end_time` to analyze only a portion of the video. Requires `model_name` set to `"pegasus1.5"`. If omitted, defaults to the video's internal start time. Most videos start at 0, but some (for example, from cameras or broadcast recordings) may have a non-zero start time. To find the value, run `ffprobe -v error -show_entries format=start_time,duration -of default=noprint_wrappers=1 your_video.mp4`. Must be less than `end_time` and less than the video duration. The clip (`end_time` − `start_time`) must be at least `4` seconds.                                    |
| `end_time`        | `typing.Optional[float]`                   | No       | End of the analysis window, as an absolute timestamp in seconds, based on the video's internal metadata. Use with `start_time` to analyze only a portion of the video. Requires `model_name` set to `"pegasus1.5"`. If omitted, defaults to the video's internal start time plus its duration. Most videos start at 0, but some (for example, from cameras or broadcast recordings) may have a non-zero start time. To find the value, run `ffprobe -v error -show_entries format=start_time,duration -of default=noprint_wrappers=1 your_video.mp4`. Must be greater than `start_time` and less than or equal to the video duration. The clip (`end_time` − `start_time`) must be at least `4` seconds. |
| `request_options` | `typing.Optional[RequestOptions]`          | No       | Request-specific configuration.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |

For details about `VideoContext`, `AnalyzePromptV2`, and `SmeMediaSource`, see the [Sync analysis](#sync-analysis) section above.

The `SyncResponseFormat` class contains the following properties:

| Name          | Type                       | Description                                                                                                                                                                                                                                                                                                                                           |
| ------------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `type`        | `SyncResponseFormatType`   | The response format to use. Value: `"json_schema"` (structured JSON conforming to a provided schema).                                                                                                                                                                                                                                                 |
| `json_schema` | `Dict[str, Optional[Any]]` | Contains the JSON schema that defines the response structure. The schema must adhere to the [JSON Schema Draft 2020-12](https://json-schema.org/draft/2020-12) specification. For details, see the [`json_schema`](/v1.3/api-reference/analyze-videos/sync-analysis#request.body.response_format.json_schema) parameter in the API Reference section. |

**Return value**: Returns an iterator of `StreamAnalyzeResponse` objects. Each response can be a `StreamAnalyzeResponse_StreamStart`, `StreamAnalyzeResponse_TextGeneration`, or `StreamAnalyzeResponse_StreamEnd`.

The `StreamAnalyzeResponse_StreamStart` class contains the following properties:

| Name         | Type                                    | Description                                                |
| ------------ | --------------------------------------- | ---------------------------------------------------------- |
| `event_type` | `typing.Literal["stream_start"]`        | This field is always set to `stream_start` for this event. |
| `metadata`   | `Optional[StreamStartResponseMetadata]` | An object containing metadata about the stream.            |

The  `StreamAnalyzeResponse_TextGeneration` class contains the following properties:

| Name         | Type                                | Description                                                                                                                        |
| ------------ | ----------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `event_type` | `typing.Literal["text_generation"]` | This field is always set to `text_generation` for this event.                                                                      |
| `text`       | `Optional[str]`                     | A fragment of the generated text. Text fragments may be split at arbitrary points, not necessarily at word or sentence boundaries. |

The `StreamAnalyzeResponse_StreamEnd` class contains the following properties:

| Name            | Type                                         | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| --------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `event_type`    | `typing.Literal["stream_end"]`               | This field is always set to `stream_end` for this event.                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| `finish_reason` | `typing.Optional[FinishReason]`              | The reason the generation stopped. Values:<br /> - `null`: The generation hasn't finished yet.<br /> - `"stop"`: The generation reached the end of the output text.<br /> - `"length"`: The response reached the maximum response length or the [context window](/v1.3/docs/concepts/models/pegasus#context-window). The partial output is returned and a warning is in the `error` field. Both Pegasus 1.5 and Pegasus 1.2 report `"length"`. For JSON responses, this may return truncated JSON that fails to parse. |
| `metadata`      | `typing.Optional[StreamEndResponseMetadata]` | An object containing metadata about the stream.                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |

The `StreamStartResponseMetadata` class contains the following properties:

| Name            | Type            | Description                                     |
| --------------- | --------------- | ----------------------------------------------- |
| `generation_id` | `Optional[str]` | A unique identifier for the generation session. |

The `StreamEndResponseMetadata` class contains the following properties:

| Name            | Type                   | Description                                                      |
| --------------- | ---------------------- | ---------------------------------------------------------------- |
| `generation_id` | `Optional[str]`        | The same unique identifier provided in the `stream_start` event. |
| `usage`         | `Optional[TokenUsage]` | The number of tokens used in the generation.                     |

The `TokenUsage` class contains the following properties:

| Name            | Type            | Description                                                                                                                                                                 |
| --------------- | --------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `output_tokens` | `int`           | The number of tokens in the generated text.                                                                                                                                 |
| `input_tokens`  | `Optional[int]` | The number of tokens the input consumed. Together with `output_tokens`, this value must fit within the [context window](/v1.3/docs/concepts/models/pegasus#context-window). |

**API Reference**: [Sync analysis](/v1.3/api-reference/analyze-videos/sync-analysis).

**Related guide**: [Analyze videos](/v1.3/docs/guides/analyze-videos).

# Error codes

This section lists the most common error messages you may encounter while analyzing videos.

* `token_limit_exceeded`
  * The request exceeds the [context window](/v1.3/docs/concepts/models/pegasus#context-window) and cannot be processed. Reduce the prompt length, use a shorter video, or lower the `max_tokens` value.
* `output truncated: the generation reached the configured max_tokens. The partial output is returned; raise max_tokens (up to 98304) if you need a longer response.`
  * The response reached the maximum response length. The platform returns the partial output and sets `finish_reason` to `"length"`. This message appears in the `error.message` field.
* `output truncated: combined input and output tokens reached the model's context limit. The partial output is returned; consider reducing input size (shorter prompt, smaller video clip, fewer media bindings) or lowering max_tokens.`
  * The request reached the [context window](/v1.3/docs/concepts/models/pegasus#context-window). The platform returns the partial output and sets `finish_reason` to `"length"`. This message appears in the `error.message` field.
* `index_not_supported_for_generate`
  * You can only summarize videos uploaded to an index with an engine from the Pegasus family enabled.

For a list of general errors that apply to all endpoints, see the [Error codes](/v1.3/api-reference/error-codes) page.