@ai-sdk/provider
Version:
48 lines (40 loc) • 1.26 kB
text/typescript
import type { SharedV4ProviderMetadata } from '../../shared';
/**
* A video or image file that can be used for video editing or image-to-video generation.
* Supports both image inputs (for image-to-video) and video inputs (for editing).
*/
export type VideoModelV4File =
| {
type: 'file';
/**
* The IANA media type of the file.
* Video types: 'video/mp4', 'video/webm', 'video/quicktime'
* Image types: 'image/png', 'image/jpeg', 'image/webp'
*/
mediaType: string;
/**
* File data as base64 encoded string or binary data.
*/
data: string | Uint8Array;
/**
* Optional provider-specific metadata for the file part.
*/
providerOptions?: SharedV4ProviderMetadata;
}
| {
type: 'url';
/**
* The URL of the video or image file.
*/
url: string;
/**
* The media type of the referenced file, when known.
* Video types: 'video/mp4', 'video/webm', 'video/quicktime'
* Image types: 'image/png', 'image/jpeg', 'image/webp'
*/
mediaType?: string;
/**
* Optional provider-specific metadata for the file part.
*/
providerOptions?: SharedV4ProviderMetadata;
};