import type { VideoCallContext, VideoContent, VideoJobRef, VideoJobState, VideoModelCapabilities, VideoProvider, VideoProviderInfo, VideoProviderRequest } from './index.js'; /** Options for the Google video provider, for the Gemini API or Vertex AI. */ export interface GoogleVideoProviderConfig { /** Gemini API key, sent as `x-goog-api-key`. */ apiKey?: string; /** * OAuth bearer token for Vertex AI, or a function that returns a fresh one: a job can outlive a * token. Takes precedence over `apiKey`, and requires `baseUrl` to point at a Vertex endpoint such as * `https://us-central1-aiplatform.googleapis.com/v1/projects/P/locations/us-central1/publishers/google`. */ accessToken?: string | (() => string | Promise); /** API base URL. Defaults to the Gemini API, `https://generativelanguage.googleapis.com/v1beta`. */ baseUrl?: string; /** * Vertex AI only: where Veo writes each video, as `gs://bucket/prefix`. Without it Vertex returns the * bytes inline, and a job cannot be extended from what it made. */ storageUri?: string; /** * The model a request naming none uses. Defaults to `gemini-omni-1.1-flash` on the Gemini API and * `veo-3.1-generate-001` on Vertex AI. */ defaultModel?: string; /** * The models served. Defaults to Gemini Omni Flash on the Gemini API, where the Veo 3.1 previews shut * down on 2026-10-22, and to Veo 3.1 on Vertex AI. A model named `gemini-omni…` is reached through the * Interactions API, any other through Veo's protocol. */ models?: readonly string[]; /** Where a model differs from what the adapter knows of it. */ byModel?: Record>; /** `dont_allow`, `allow_adult`, or `allow_all`, sent to Veo as `personGeneration`. Some regions allow only `allow_adult`. */ personGeneration?: string; /** * Vertex AI only: where Gemini Omni Flash's interactions are, such as * `https://aiplatform.googleapis.com/v1beta1/projects/P/locations/global`. Defaults to that URL for the * project `baseUrl` names, since Omni is served at the global location alone. */ interactionsBaseUrl?: string; /** Headers added to every request. */ defaultHeaders?: Record; /** Replaces the global `fetch`. */ fetch?: typeof globalThis.fetch; } /** * Google's video models behind the video contract. * * Gemini Omni Flash runs as a background interaction: its id is the ref, any worker reads it, and its * video comes back with it, inline or by a Files API URI. It extends or edits a video given to it, or * continues an interaction of its own by its id, with nothing uploaded. * * Veo runs as a long-running operation: its name is the ref, any worker polls it, and the video is read * from the URI the Gemini API returns, from Cloud Storage, or from the bytes Vertex returns inline. On * Vertex it extends a video in Cloud Storage by seven seconds, or a job of its own that wrote there. */ export declare class GoogleVideoProvider implements VideoProvider { private readonly config; /** Provider name, capabilities, and models. */ readonly info: VideoProviderInfo; private readonly baseUrl; private readonly fetchImplementation; private readonly vertex; /** Interactions read as finished, so the download right after reads no second copy of the video. */ private readonly finished; constructor(config: GoogleVideoProviderConfig); /** What one model takes: Omni's, Veo 3.1's, or Veo's on Vertex, which extends videos too. */ private capabilitiesFor; /** Starts an interaction for Omni, or a long-running prediction for Veo. */ submit(request: VideoProviderRequest, context: VideoCallContext): Promise; /** Reads the interaction or the operation. */ poll(ref: VideoJobRef, context: VideoCallContext): Promise; /** Streams one video: from its URI, from Cloud Storage, or from the bytes returned with the job. */ download(ref: VideoJobRef, index: number, context: VideoCallContext): Promise; /** Cancels a running interaction. A Veo operation runs to its end. */ cancel(ref: VideoJobRef, context: VideoCallContext): Promise; /** Deletes a finished interaction, and its video, from Google. */ remove(ref: VideoJobRef, context: VideoCallContext): Promise; /** Where interactions are: the Gemini API itself, or Vertex AI's global location for the project. */ private interactionsBase; private startInteraction; private pollInteraction; private interaction; /** Keeps the last few finished interactions, whose video the download reads. */ private remember; private operation; /** The video Veo extends: one in Cloud Storage, or one a job of its own wrote there. */ private veoVideo; private image; private call; private send; }