Skip to content
Source
Sign inSign up
TanStack/ai
Open History to see the last commit

VideoGenerationOptions.md

121 lines2.7 KB

1---
2id: VideoGenerationOptions
3title: VideoGenerationOptions
4---
5​
6# Interface: VideoGenerationOptions\<TProviderOptions, TSize, TDuration\>
7​
8Defined in: [packages/ai/src/types.ts:1935](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1935)
9​
10**`Experimental`**
11​
12Options for video generation.
13These are the common options supported across providers.
14​
15 Video generation is an experimental feature and may change.
16​
17## Type Parameters
18​
19### TProviderOptions
20​
21`TProviderOptions` *extends* `object` = `object`
22​
23### TSize
24​
25`TSize` *extends* `string` \| `undefined` = `string`
26​
27### TDuration
28​
29`TDuration` *extends* `string` \| `number` \| `undefined` = `number`
30​
31## Properties
32​
33### duration?
34​
35```ts
36optional duration: TDuration;
37```
38​
39Defined in: [packages/ai/src/types.ts:1958](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1958)
40​
41**`Experimental`**
42​
43Video duration in seconds. Adapters that declare a per-model duration
44map narrow this to the model's valid union; use
45`adapter.snapDuration(seconds)` to coerce raw seconds to a valid value.
46​
47***
48​
49### logger
50​
51```ts
52logger: InternalLogger;
53```
54​
55Defined in: [packages/ai/src/types.ts:1965](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1965)
56​
57**`Experimental`**
58​
59Internal logger threaded from the generateVideo() entry point. Adapters must
60call logger.request() before the SDK call and logger.errors() in catch blocks.
61​
62***
63​
64### model
65​
66```ts
67model: string;
68```
69​
70Defined in: [packages/ai/src/types.ts:1941](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1941)
71​
72**`Experimental`**
73​
74The model to use for video generation
75​
76***
77​
78### modelOptions?
79​
80```ts
81optional modelOptions: TProviderOptions;
82```
83​
84Defined in: [packages/ai/src/types.ts:1960](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1960)
85​
86**`Experimental`**
87​
88Model-specific options for video generation
89​
90***
91​
92### prompt
93​
94```ts
95prompt: MediaPrompt;
96```
97​
98Defined in: [packages/ai/src/types.ts:1950](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1950)
99​
100**`Experimental`**
101​
102Description of the desired video: a plain string, or an ordered array of
103content parts for image-conditioned generation. Image parts may carry
104`metadata.role` (`'start_frame' | 'end_frame' | 'reference' |
105'character'`) to disambiguate intent; adapters route them onto the
106provider-native request (e.g. OpenAI Sora `input_reference`, fal
107`image_url` / `end_image_url`) and throw at runtime if unsupported.
108​
109***
110​
111### size?
112​
113```ts
114optional size: TSize;
115```
116​
117Defined in: [packages/ai/src/types.ts:1952](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1952)
118​
119**`Experimental`**
120​
121Video size — format depends on the provider (e.g., "16:9", "1280x720")