Text prompt describing the desired video content.
Optional imageSource image (the first frame) for image-to-video generation. When
provided, the request is dispatched to imageToVideo() instead of
generateVideo().
Accepts a Buffer, an https:// URL or a data: URL. fal, Replicate and
Runway receive a URL as given and a Buffer as a data: URL; the Gemini
provider fetches an https:// URL itself through the checked egress
path (public addresses on port 443, each redirect checked) and sends the
bytes inline.
Optional referenceImages of subjects or assets the video must keep consistent
(reference-to-video), in the same forms as image. Sent as fal's
reference_image_urls, Replicate's reference_images, or Gemini image
parts after the source image.
Optional providerExplicit provider identifier ("runway", "replicate", "fal" or
"gemini"). When omitted, auto-detection from environment variables is
used; "gemini" runs only when named here.
Optional modelModel identifier within the provider (e.g.
"fal-ai/minimax/hailuo-02/standard/image-to-video", "google/veo-3.1",
"gemini-omni-1.1-flash"). When omitted, the provider picks its default,
which on fal is a text-to-video or an image-to-video endpoint as the call
needs.
Optional durationDesired output duration in seconds.
Optional aspectDesired aspect ratio (e.g. "16:9", "9:16").
Optional resolutionDesired output resolution, in the model's own vocabulary (e.g. "720p",
"1080p", or "768P" for MiniMax on fal). Sent as given, for
text-to-video and image-to-video.
Optional negativeNegative prompt describing content to avoid.
Optional seedRandom seed for reproducible generation (provider-dependent).
Optional timeoutMaximum time in milliseconds to wait for generation to complete, given to
each provider at initialize(): the polling budget on fal, Replicate and
Runway, and the deadline of every request on Gemini.
Optional providerProvider-specific model inputs the typed fields do not cover, such as
fal's end_image_url or Replicate's last_frame.
Key them by provider id ({ fal: {...}, replicate: {...} }) so each
provider in a fallback chain receives only its own entry; a bag with no
provider-id key goes whole to fal, Replicate and Gemini. They add inputs
and never replace a field the call sets: to send a model-specific value
for such a field, leave the typed field unset and put the value here.
Runway sends no provider options.
Optional onOptional progress callback invoked during long-running generation. Called with a VideoProgressEvent at each status transition.
Optional apiOverride the provider API key instead of reading from env vars.
Optional baseOverride the provider base URL.
Optional providerProvider preferences for reordering or filtering the fallback chain.
When supplied, the available video providers are reordered according to
preferred and filtered by blocked before building the chain.
Optional usageOptional durable usage ledger configuration for accounting.
Options for a generateVideo call.
At minimum, a
promptis required. The provider is resolved fromopts.provider,opts.apiKey, or the first video-capable env var found (RUNWAY_API_KEY->REPLICATE_API_TOKEN->FAL_API_KEY).