Interface ImageToVideoRequest

Request payload for image-to-video generation.

Passed to IVideoGenerator.imageToVideo by the high-level orchestration layer. Requires a source image that serves as the first frame (or style reference) for the generated video.

interface ImageToVideoRequest {
    modelId?: string;
    image: VideoImageInput;
    prompt: string;
    negativePrompt?: string;
    durationSec?: number;
    aspectRatio?: VideoAspectRatio;
    resolution?: string;
    referenceImages?: VideoImageInput[];
    outputFormat?: VideoOutputFormat;
    fps?: number;
    seed?: number;
    userId?: string;
    providerOptions?: Record<string, unknown> | VideoProviderOptionBag;
}

Properties

modelId?: string

Model identifier to use for generation.

Source image (the first frame): raw bytes, an https:// URL or a data: URL. See VideoImageInput for how each provider sends it. A custom provider that sends a URL can pass it through videoImageToUrl() (from the video index), which leaves a string as it is and turns a Buffer into a data: URL. A string reaches a provider only when the caller passed one.

prompt: string

Text prompt describing the desired motion / narrative.

negativePrompt?: string

Negative prompt describing content to avoid.

durationSec?: number

Desired output duration in seconds.

aspectRatio?: VideoAspectRatio

Desired aspect ratio.

resolution?: string

Desired output resolution, in the model's own vocabulary (for example '720p', '1080p', or fal's '768P' for MiniMax). Sent as given.

referenceImages?: VideoImageInput[]

Images of subjects or assets the video must keep consistent, besides the source image. Sent as fal's reference_image_urls, Replicate's reference_images, or Gemini image parts after the source image.

outputFormat?: VideoOutputFormat

Output container format. Defaults to 'mp4'.

fps?: number

Frames per second for the output video.

seed?: number

Seed for reproducible output.

userId?: string

Identifier of the requesting user.

providerOptions?: Record<string, unknown> | VideoProviderOptionBag

Provider-specific model inputs: a VideoProviderOptionBag keyed by provider id, or a flat object that fal, Replicate and Gemini receive whole.