class

OpenAI::CreateVideoBody

Inherits JSON::Serializable < Reference < Object

Parameters for creating a new video generation job.

Constructors

new(model : VideoModel | Nil = nil, prompt : String = "", input_reference : String | Nil = nil, seconds : VideoSeconds | Nil = nil, size : VideoSize | Nil = nil)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source

Instance methods

input_reference

Optional image reference that guides generation.

Source
input_reference=(input_reference : String | Nil)

Optional image reference that guides generation.

Source
model

The video generation model to use (allowed values: sora-2, sora-2-pro). Defaults to sora-2.

Source
model=(model : VideoModel | Nil)

The video generation model to use (allowed values: sora-2, sora-2-pro). Defaults to sora-2.

Source
prompt

Text prompt that describes the video to generate.

Source
prompt=(prompt : String)

Text prompt that describes the video to generate.

Source
seconds

Clip duration in seconds (allowed values: 4, 8, 12). Defaults to 4 seconds.

Source
seconds=(seconds : VideoSeconds | Nil)

Clip duration in seconds (allowed values: 4, 8, 12). Defaults to 4 seconds.

Source
size

Output resolution formatted as width x height (allowed values: 720x1280, 1280x720, 1024x1792, 1792x1024). Defaults to 720x1280.

Source
size=(size : VideoSize | Nil)

Output resolution formatted as width x height (allowed values: 720x1280, 1280x720, 1024x1792, 1792x1024). Defaults to 720x1280.

Source
validate!
Source