Interface AnalyzeVideoOptions

Options for a analyzeVideo call.

At minimum, a video source (videoUrl or videoBuffer) is required.

interface AnalyzeVideoOptions {
    videoUrl?: string;
    videoBuffer?: Buffer<ArrayBufferLike>;
    prompt?: string;
    model?: string;
    maxFrames?: number;
    sceneThreshold?: number;
    transcribeAudio?: boolean;
    descriptionDetail?: DescriptionDetail;
    maxScenes?: number;
    indexForRAG?: boolean;
    onProgress?: ((event) => void);
    providerOptions?: Record<string, unknown>;
    usageLedger?: AgentOSUsageLedgerOptions;
}

Properties

videoUrl?: string

URL of the video to analyse. Mutually exclusive with videoBuffer.

videoBuffer?: Buffer<ArrayBufferLike>

Raw video bytes. Mutually exclusive with videoUrl.

prompt?: string

Text prompt / question to guide the analysis (e.g. "Describe the key actions in this video").

model?: string

Model identifier to use for the vision LLM analysis step.

maxFrames?: number

Maximum number of frames to sample for analysis.

sceneThreshold?: number

Threshold for scene change detection (0-1). Lower values detect more scene boundaries (more sensitive); higher values only detect dramatic cuts.

Default

0.3
transcribeAudio?: boolean

Whether to transcribe the audio track using the configured STT provider.

Default

true
descriptionDetail?: DescriptionDetail

How detailed scene descriptions should be.

Default

'detailed'
maxScenes?: number

Maximum number of scenes to detect. Prevents runaway analysis on very long videos.

Default

100
indexForRAG?: boolean

Whether to index scene descriptions and transcripts into the RAG vector store for later retrieval.

Default

false
onProgress?: ((event) => void)

Optional callback invoked as analysis progresses through phases.

Type declaration

providerOptions?: Record<string, unknown>

Arbitrary provider-specific options.

Optional durable usage ledger configuration for accounting.