@@ -131,10 +131,16 @@ export interface VideoCreateParams {
131131 fps ?: number ;
132132
133133 /**
134- * Array of images to guide video generation, similar to keyframes.
134+ * @deprecated Deprecated: use media.frame_images instead. Array of images to guide
135+ * video generation, similar to keyframes.
135136 */
136137 frame_images ?: Array < VideoCreateParams . FrameImage > ;
137138
139+ /**
140+ * Whether to generate audio for the video.
141+ */
142+ generate_audio ?: boolean ;
143+
138144 /**
139145 * Controls how closely the video generation follows your prompt. Higher values
140146 * make the model adhere more strictly to your text description, while lower values
@@ -146,6 +152,12 @@ export interface VideoCreateParams {
146152
147153 height ?: number ;
148154
155+ /**
156+ * Media inputs for video generation. The accepted fields depend on the model type
157+ * (e.g. i2v, r2v, t2v, videoedit).
158+ */
159+ media ?: VideoCreateParams . Media ;
160+
149161 /**
150162 * Similar to prompt, but specifies what to avoid instead of what to include
151163 */
@@ -167,12 +179,22 @@ export interface VideoCreateParams {
167179 prompt ?: string ;
168180
169181 /**
170- * Unlike frame_images which constrain specific timeline positions, reference
171- * images guide the general appearance that should appear consistently across the
172- * video.
182+ * Aspect ratio of the video.
183+ */
184+ ratio ?: string ;
185+
186+ /**
187+ * @deprecated Deprecated: use media.reference_images instead. Unlike frame_images
188+ * which constrain specific timeline positions, reference images guide the general
189+ * appearance that should appear consistently across the video.
173190 */
174191 reference_images ?: Array < string > ;
175192
193+ /**
194+ * Video resolution.
195+ */
196+ resolution ?: string ;
197+
176198 /**
177199 * Clip duration in seconds.
178200 */
@@ -212,6 +234,92 @@ export namespace VideoCreateParams {
212234 */
213235 frame ?: number | 'first' | 'last' ;
214236 }
237+
238+ /**
239+ * Media inputs for video generation. The accepted fields depend on the model type
240+ * (e.g. i2v, r2v, t2v, videoedit).
241+ */
242+ export interface Media {
243+ /**
244+ * Array of audio inputs.
245+ */
246+ audio_inputs ?: Array < Media . AudioInput > ;
247+
248+ /**
249+ * Array of images to guide video generation at specific timeline positions.
250+ */
251+ frame_images ?: Array < Media . FrameImage > ;
252+
253+ /**
254+ * Array of video clips to use as starting clips.
255+ */
256+ frame_videos ?: Array < Media . FrameVideo > ;
257+
258+ /**
259+ * Array of image URLs that guide the general appearance across the video.
260+ */
261+ reference_images ?: Array < string > ;
262+
263+ /**
264+ * Array of reference videos.
265+ */
266+ reference_videos ?: Array < Media . ReferenceVideo > ;
267+
268+ /**
269+ * Source video to edit.
270+ */
271+ source_video ?: Media . SourceVideo ;
272+ }
273+
274+ export namespace Media {
275+ export interface AudioInput {
276+ /**
277+ * URL of the audio.
278+ */
279+ audio : string ;
280+ }
281+
282+ export interface FrameImage {
283+ /**
284+ * URL path to hosted image that is used for a frame
285+ */
286+ input_image : string ;
287+
288+ /**
289+ * Optional param to specify where to insert the frame. If this is omitted, the
290+ * following heuristics are applied:
291+ *
292+ * - frame_images size is one, frame is first.
293+ * - If size is two, frames are first and last.
294+ * - If size is larger, frames are first, last and evenly spaced between.
295+ */
296+ frame ?: number | 'first' | 'last' ;
297+ }
298+
299+ export interface FrameVideo {
300+ /**
301+ * URL of the video.
302+ */
303+ video : string ;
304+ }
305+
306+ export interface ReferenceVideo {
307+ /**
308+ * URL of the video.
309+ */
310+ video : string ;
311+ }
312+
313+ /**
314+ * Source video to edit.
315+ */
316+ export interface SourceVideo {
317+ /**
318+ * URL of the video.
319+ */
320+ video : string ;
321+ }
322+ }
215323}
216324
217325export declare namespace Videos {
0 commit comments