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).
When to use this method:
Do not use this method for:
POST method of the /analyze/tasks endpoint instead.POST method of the /analyze/tasks endpoint with the model_name parameter set to pegasus1.5 instead.This endpoint is rate-limited. For details, see the Rate limits page.
Controls the randomness of the text output.
Default: 0.2 Min: 0 Max: 1
Specifies the format of the response. When you omit this parameter, the platform returns unstructured text. Only the json_schema type is supported for synchronous analysis.
Your API key.
You can find your API key on the API Keys page.
The video understanding model to use for analysis.
pegasus1.2: General analysis (prompt-based text generation).pegasus1.5: General analysis (prompt-based text generation) with video clipping, structured prompts with reference images, and video segmentation (async only). See the Pegasus page for token limits.Default: pegasus1.2
The unique identifier of the video to analyze. Use this parameter when the model_name parameter is pegasus1.2. Not supported with pegasus1.5.
video parameter instead.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_v2 parameter instead (Pegasus 1.5 only). Mutually exclusive with the prompt_v2 parameter.
Your prompts can be instructive or descriptive, or you can phrase them as questions. Pegasus 1.2 limits prompts to 2,000 tokens. For Pegasus 1.5, this text counts toward the context window.
A structured prompt with <@name> placeholders for referencing images. Requires the model_name parameter set to pegasus1.5. Mutually exclusive with the prompt parameter.
The prompt text and reference images count toward the context window.
Set this parameter to true to enable streaming responses in the NDJSON format.
Default: true
The maximum response length, in tokens. The allowed range depends on the model:
Start of the analysis window, in seconds. Use with end_time to analyze only a portion of the video. Requires model_name set to pegasus1.5.
0.end_time and less than the video duration. The clip (end_time - start_time) must be at least 4 seconds.End of the analysis window, in seconds. Use with start_time to analyze only a portion of the video. Requires model_name set to pegasus1.5.
start_time and less than or equal to the video duration. The clip (end_time - start_time) must be at least 4 seconds.