CreateVideoRequest class

Request to create a new video generation job.

Example

final video = await client.videos.create(
  CreateVideoRequest(
    prompt: 'A cat playing piano',
    model: 'sora-2',
    size: VideoSize.size1280x720,
    seconds: VideoSeconds.s8,
  ),
);
Annotations
  • @immutable

Constructors

CreateVideoRequest({required String prompt, String? model, VideoSeconds? seconds, VideoSize? size, VideoInputReference? inputReference})
Creates a CreateVideoRequest.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
inputReference VideoInputReference?
Optional reference image that guides generation.
final
model String?
The video generation model to use.
final
prompt String
Text prompt that describes the video to generate.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
seconds VideoSeconds?
Clip duration in seconds.
final
size VideoSize?
Output resolution.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Converts to JSON.
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override