API Reference
Classes
Section titled “Classes”ComposeAccessor
Section titled “ComposeAccessor”Exposes timeline rendering — sync and queued — under `multimedia.compose`.
JobHandle
Section titled “JobHandle”Thin wrapper around lexigram-tasks' IdempotencyResult.
Exists so multimedia callers don’t need to import lexigram-tasks types directly — see design spec ‘Async job model’.
MultimediaConfig
Section titled “MultimediaConfig”Umbrella configuration for the multimedia subsystem.
MultimediaGenerationEvent
Section titled “MultimediaGenerationEvent”Emitted after a generate()/submit() call completes (success or failure).
MultimediaModule
Section titled “MultimediaModule”Audio/video/image generation: TTS, music, video, image, upscale, interpolate, and beat-analysis subsystems.
MultimediaProvider
Section titled “MultimediaProvider”Provider that registers all seven core multimedia sub-providers.
Hardcodes wiring of the 7 core siblings (matching AIProvider.register()‘s treatment of llm/vector/rag) rather than relying purely on entry-point discovery — each needs its own typed config sub-object from MultimediaConfig, which a generic entry-point loop can’t supply.
SubsystemAccessor
Section titled “SubsystemAccessor”Wraps one sub-provider's backend + task manager + storage normalizer.
Timeline
Section titled “Timeline”Builds up a video composition spec; render() executes it via a VideoProcessor.
Execute the composition pipeline via a VideoProcessor.
Assembles clips (single clip passes through directly, multiple clips concat with transitions), then applies the compose stage when any overlay, audio layer, fade, or encode option is set, then narration, music, and captions stages.
| Parameter | Type | Description |
|---|---|---|
| `processor` | VideoProcessor | Processor that executes each pipeline operation. |
| `progress_callback` | Callable[[float], None] | None | Optional sync callback invoked with 0.0..1.0 progress during the compose stage. |
| Type | Description |
|---|---|
| Result[MediaAsset, VideoGenerationError] | Ok(final asset) on success, Err(error) on the first failing stage. |
Note
Audio layers mix into the composed audio; a narration asset replaces it. Callers should use one or the other.
TimelineRenderTask
Section titled “TimelineRenderTask”
VideoAccessor
Section titled “VideoAccessor”Exposes both video generation and video processing under `multimedia.video`.
Upscale a whole video by a factor of 2 or 4.
Requires a whole-video upscaling service, which is only built when a
VideoProcessor was configured in the upscale subsystem.
| Parameter | Type | Description |
|---|---|---|
| `asset` | MediaAsset | Source video asset to upscale. |
| `scale_factor` | Literal[2, 4] | Upscale multiplier, 2 or 4. Defaults to 4. |
| Type | Description |
|---|---|
| Result[MediaAsset, MultimediaError] | Ok(upscaled_asset) on success, Err(ProviderNotInstalledError) if no VideoProcessor was configured. |
Example
result = await video.upscale_video(asset, scale_factor=2)if result.is_ok(): print(result.unwrap().url)Interpolate a whole video to a higher frame rate (motion smoothing).
Requires a whole-video interpolation service, which is only built when
a VideoProcessor was configured in the interpolate subsystem.
| Parameter | Type | Description |
|---|---|---|
| `asset` | MediaAsset | Source video asset to interpolate. |
| `factor` | Literal[2, 4] | Frame multiplier, 2 or 4. Defaults to 2. |
| `fps` | float | Output target frame rate in frames per second. |
| Type | Description |
|---|---|
| Result[MediaAsset, MultimediaError] | Ok(interpolated_asset) on success, Err(ProviderNotInstalledError) if no VideoProcessor was configured. |
Example
result = await video.interpolate_video(asset, factor=2, fps=60.0)if result.is_ok(): print(result.unwrap().url)