Video segmentation tasks now fail when the output is truncated
In video segmentation, an analysis task fails when its reaches the maximum response length or the context window before completing. The error.message field states the limit the analysis reached.
Previously, the task completed with status set to ready, result.finish_reason set to length, and an empty or partial segment list in result.data.
A failed task returns no result object. If your code checks finish_reason to detect truncation, check status instead.
General analysis is unchanged. A truncated response still completes with status set to ready, the partial output in result.data, and a warning in the error field.
For details, see the Segment videos page.
The duration limit now applies to the window you analyze
For asynchronous analysis endpoints, the duration limit applies to the window you analyze, not the whole video. The window must stay within 2 hours. HLS and base64 sources are limited to 2 hours.
The POST method of the /analyze/tasks endpoint accepts a video of up to 4 hours when you analyze only a portion of it. The same limits apply to each analysis request in the POST method of the /analyze/batches endpoint. When you omit start_time and end_time, you analyze the whole video, so the video must still be within 2 hours.
Synchronous analysis with the POST method of the /analyze endpoint keeps its 1-hour limit. File size limits are unchanged.
The minimum analyzed duration is now 1 second
The minimum analysis duration in Pegasus 1.5 is 1 second, down from 4 seconds. This minimum applies to the analyzed portion of a video, not the whole video. For example, you can analyze one second of a 60-second video.