VideoGenerationRequest - Python SDK

VideoGenerationRequest method reference

The Python SDK and docs are currently in beta. Report issues on GitHub.

Fields

FieldTypeRequiredDescriptionExample
aspect_ratioOptional[components.AspectRatio]Aspect ratio of the generated video16:9
callback_urlOptional[str]URL to receive a webhook notification when the video generation job completes. Overrides the workspace-level default callback URL if set. Must be HTTPS.https://example.com/webhook
durationOptional[int]Duration of the generated video in seconds8
frame_imagesList[components.FrameImage]Images to use as the first and/or last frame of the generated video. Each image must specify a frame_type of first_frame or last_frame.
generate_audioOptional[bool]Whether to generate audio alongside the video. Defaults to the endpoint’s generate_audio capability flag, false if not set.true
input_referencesList[components.InputReference]Reference assets to guide video generation. Accepts image, audio, and video references. Audio and video references are only honored by providers that support them (currently BytePlus Seedance 2.0); other providers use image references and ignore the rest.
modelstr✔️N/A
promptstr✔️N/A
providerOptional[components.VideoGenerationRequestProvider]Provider-specific passthrough configuration
resolutionOptional[components.Resolution]Resolution of the generated video720p
seedOptional[int]If specified, the generation will sample deterministically, such that repeated requests with the same seed and parameters should return the same result. Determinism is not guaranteed for all providers.
sizeOptional[str]Exact pixel dimensions of the generated video in “WIDTHxHEIGHT” format (e.g. “1280x720”). Interchangeable with resolution + aspect_ratio.1280x720