video_analyze
Analyze YouTube videos or local files to extract specific information using customizable instructions and structured JSON output.
Instructions
Analyze a video (YouTube URL or local file) with any instruction.
Provide exactly one of url or file_path. Uses Gemini's structured output for reliable JSON responses. Pass a custom output_schema to control the response shape, or use the default VideoResult schema.
When strict_contract=True, runs the full contract pipeline: analysis with strict Pydantic models, parallel strategy/concept-map generation, artifact rendering, and quality gates. Returns richer output but takes longer.
Args: url: YouTube video URL. file_path: Path to a local video file. instruction: What to analyze or extract from the video. output_schema: Optional JSON Schema dict for custom output shape. thinking_level: Gemini thinking depth. use_cache: Whether to use cached results. strict_contract: Run strict contract pipeline with quality gates.
Returns: Dict matching VideoResult schema (default), custom output_schema, or strict contract output with analysis, strategy, concept_map, artifacts.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | ||
| file_path | No | ||
| instruction | No | What to analyze — e.g. 'summarize key points', 'extract all CLI commands shown', 'list all recipes and ingredients' | Provide a comprehensive analysis of this video. |
| output_schema | No | Optional JSON Schema for the response. If omitted, uses default VideoResult schema. | |
| thinking_level | No | high | |
| use_cache | No | Use cached results | |
| strict_contract | No | Enable strict contract pipeline with quality gates, artifact rendering, and semantic validation. Produces richer output with strategy report, concept map, and HTML/Markdown artifacts. |