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

VideoGenerationOptions.md

135 lines3.0 KB

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