Skip to main content

Interface: IVideoGenerator

Defined in: packages/agentos/src/core/video/IVideoGenerator.ts:37

Abstraction over a video generation backend (Runway, Pika, Kling, Luma, Stable Video, Google Veo, Replicate, etc.).

Capability negotiation

Not every provider supports every modality. The supports method lets callers (and the FallbackVideoProxy) query whether a given capability is available before invoking it.

Lifecycle

  1. Construct the provider.
  2. Call initialize with provider-specific configuration (API keys, base URLs, etc.).
  3. Use generateVideo and/or imageToVideo.
  4. Optionally call shutdown to release resources.

Properties

defaultModelId?

readonly optional defaultModelId: string

Defined in: packages/agentos/src/core/video/IVideoGenerator.ts:45

Default model used when the request omits modelId.


isInitialized

readonly isInitialized: boolean

Defined in: packages/agentos/src/core/video/IVideoGenerator.ts:42

Whether initialize has been called successfully.


providerId

readonly providerId: string

Defined in: packages/agentos/src/core/video/IVideoGenerator.ts:39

Unique identifier for this provider (e.g. 'runway', 'pika').

Methods

generateVideo()

generateVideo(request): Promise<VideoResult>

Defined in: packages/agentos/src/core/video/IVideoGenerator.ts:61

Generate a video from a text prompt.

Parameters

request

VideoGenerateRequest

The generation parameters.

Returns

Promise<VideoResult>

A result envelope containing one or more generated videos.


imageToVideo()?

optional imageToVideo(request): Promise<VideoResult>

Defined in: packages/agentos/src/core/video/IVideoGenerator.ts:73

Generate a video from a source image and a motion prompt.

This method is optional — providers that do not support image-to-video should either omit it or have supports return false for 'image-to-video'.

Parameters

request

ImageToVideoRequest

The image-to-video parameters.

Returns

Promise<VideoResult>

A result envelope containing one or more generated videos.


initialize()

initialize(config): Promise<void>

Defined in: packages/agentos/src/core/video/IVideoGenerator.ts:53

Initialise the provider with runtime configuration.

Parameters

config

Record<string, unknown>

Provider-specific key/value pairs (API keys, endpoints, model overrides, etc.).

Returns

Promise<void>


shutdown()?

optional shutdown(): Promise<void>

Defined in: packages/agentos/src/core/video/IVideoGenerator.ts:87

Release any resources held by the provider (HTTP connections, polling loops, temp files, etc.).

Returns

Promise<void>


supports()

supports(capability): boolean

Defined in: packages/agentos/src/core/video/IVideoGenerator.ts:81

Query whether this provider supports a given capability.

Parameters

capability

The capability to check.

"text-to-video" | "image-to-video"

Returns

boolean

true if the provider can handle the requested capability.