Constructs a new AIClient instance.
OptionaljobManager: JobManagerOptional custom JobManager instance.
Optionalexecutors: CapabilityExecutorRegistryOptional custom CapabilityExecutorRegistry.
Advanced access to the job manager. Most consumers should create jobs via createCapabilityJob and execute via this manager.
The JobManager instance.
Analyzes images through the configured provider chain.
The image-analysis request payload.
The execution context used for request-scoped artifacts, history, and timeline data.
OptionalproviderChain: ProviderRef[]Optional provider-chain override. When omitted, the default chain from configuration is used.
A normalized image-analysis response from the first provider that succeeds.
Streams image analysis through the configured provider chain.
The image-analysis request payload.
The execution context used for request-scoped artifacts, history, and timeline data.
OptionalproviderChain: ProviderRef[]Optional provider-chain override. When omitted, the default chain from configuration is used.
An async generator yielding normalized image-analysis chunks from the first provider that succeeds.
Analyzes video through the configured provider chain.
The video-analysis request payload.
The execution context used for request-scoped artifacts, history, and timeline data.
OptionalproviderChain: ProviderRef[]Optional provider-chain override. When omitted, the default chain from configuration is used.
A normalized video-analysis response from the first provider that succeeds.
Executes a non-streaming chat request against the configured provider chain.
The chat request payload to send to the selected provider.
The execution context used for request-scoped artifacts, history, and timeline data.
OptionalproviderChain: ProviderRef[]Optional provider-chain override. When omitted, the default chain from configuration is used.
A normalized chat response from the first provider that succeeds.
Executes a streaming chat request against the configured provider chain.
Streaming is exposed as an AsyncGenerator of normalized response chunks. The client does not
buffer or reshape chunks beyond provider normalization.
The chat request payload to stream to the selected provider.
The execution context used for request-scoped artifacts, history, and timeline data.
OptionalproviderChain: ProviderRef[]Optional provider-chain override. When omitted, the default chain from configuration is used.
An async generator yielding normalized chat chunks from the first provider that succeeds.
Creates a new job for executing a capability with full lifecycle management.
This is the primary entry point for consumers to submit AI requests. The returned job can be queued, observed, persisted, rerun, and supports streaming or non-streaming execution.
Features:
Capability key type (e.g., chat, image, embedding)
Input type for the capability
Output type for the capability
The capability key to execute (must be registered).
The AIRequest payload (input, options, context, etc.).
Optionaloptions: {Optional per-job overrides:
A GenericJob instance representing the full execution lifecycle.
Downloads generated video assets through the configured provider chain.
The video-download request payload.
The execution context used for request-scoped artifacts, history, and timeline data.
OptionalproviderChain: ProviderRef[]Optional provider-chain override. When omitted, the default chain from configuration is used.
A normalized video-download response from the first provider that succeeds.
Edits images through the configured provider chain.
The image-edit request payload.
The execution context used for request-scoped artifacts, history, and timeline data.
OptionalproviderChain: ProviderRef[]Optional provider-chain override. When omitted, the default chain from configuration is used.
A normalized image-edit response from the first provider that succeeds.
Streams image edits through the configured provider chain.
The image-edit request payload.
The execution context used for request-scoped artifacts, history, and timeline data.
OptionalproviderChain: ProviderRef[]Optional provider-chain override. When omitted, the default chain from configuration is used.
An async generator yielding normalized image-edit chunks from the first provider that succeeds.
Generates embeddings through the configured provider chain.
The embedding request payload.
The execution context used for request-scoped artifacts, history, and timeline data.
OptionalproviderChain: ProviderRef[]Optional provider-chain override. When omitted, the default chain from configuration is used.
A normalized embedding response from the first provider that succeeds.
Extends an existing video through the configured provider chain.
The video-extension request payload.
The execution context used for request-scoped artifacts, history, and timeline data.
OptionalproviderChain: ProviderRef[]Optional provider-chain override. When omitted, the default chain from configuration is used.
A normalized video-extension response from the first provider that succeeds.
Returns all registered providers that support a given capability.
This method exists primarily for:
It does NOT perform routing or ranking.
Capability key type
The capability key to search for.
Array of providers that implement the requested capability.
Generates images through the configured provider chain.
The image-generation request payload.
The execution context used for request-scoped artifacts, history, and timeline data.
OptionalproviderChain: ProviderRef[]Optional provider-chain override. When omitted, the default chain from configuration is used.
A normalized image-generation response from the first provider that succeeds.
Streams generated images through the configured provider chain.
The image-generation request payload.
The execution context used for request-scoped artifacts, history, and timeline data.
OptionalproviderChain: ProviderRef[]Optional provider-chain override. When omitted, the default chain from configuration is used.
An async generator yielding normalized image-generation chunks from the first provider that succeeds.
Generates video through the configured provider chain.
The video-generation request payload.
The execution context used for request-scoped artifacts, history, and timeline data.
OptionalproviderChain: ProviderRef[]Optional provider-chain override. When omitted, the default chain from configuration is used.
A normalized video-generation response from the first provider that succeeds.
Returns the resolved ProviderPlane application configuration.
The loaded application configuration after node-config and environment resolution.
Resolves a provider by type and connection name.
This method intentionally throws hard errors:
The type of the provider, typically a BaseProvider combined with a capability interface
Provider type to resolve.
Optional connection name; defaults to "default".
The requested provider instance.
Runs moderation through the configured provider chain.
The moderation request payload.
The execution context used for request-scoped artifacts, history, and timeline data.
OptionalproviderChain: ProviderRef[]Optional provider-chain override. When omitted, the default chain from configuration is used.
A normalized moderation response from the first provider that succeeds.
Registers a non-streaming capability executor for a built-in capability.
The built-in capability key.
The non-streaming executor instance.
Registers a streaming capability executor for a built-in capability.
The built-in capability key.
The streaming executor instance.
Registers a custom capability executor (streaming or non-streaming).
The custom capability key.
The executor instance.
Registers and initializes a provider instance.
Invariants:
The provider instance to register.
The type of the provider (e.g. OpenAI, Anthropic).
Optional connection name; defaults to "default".
Remixes video through the configured provider chain.
The video-remix request payload.
The execution context used for request-scoped artifacts, history, and timeline data.
OptionalproviderChain: ProviderRef[]Optional provider-chain override. When omitted, the default chain from configuration is used.
A normalized video-remix response from the first provider that succeeds.
Set lifecycle hooks for metrics, observability, and instrumentation. Can only be set once per client instance.
The hooks to set on client lifecycle events.
Transcribes audio through the configured provider chain.
The audio-transcription request payload.
The execution context used for request-scoped artifacts, history, and timeline data.
OptionalproviderChain: ProviderRef[]Optional provider-chain override. When omitted, the default chain from configuration is used.
A normalized transcription response from the first provider that succeeds.
Streams audio transcription through the configured provider chain.
The audio-transcription request payload.
The execution context used for request-scoped artifacts, history, and timeline data.
OptionalproviderChain: ProviderRef[]Optional provider-chain override. When omitted, the default chain from configuration is used.
An async generator yielding normalized transcription chunks from the first provider that succeeds.
Translates audio through the configured provider chain.
The audio-translation request payload.
The execution context used for request-scoped artifacts, history, and timeline data.
OptionalproviderChain: ProviderRef[]Optional provider-chain override. When omitted, the default chain from configuration is used.
A normalized audio-translation response from the first provider that succeeds.
Generates text-to-speech audio through the configured provider chain.
The text-to-speech request payload.
The execution context used for request-scoped artifacts, history, and timeline data.
OptionalproviderChain: ProviderRef[]Optional provider-chain override. When omitted, the default chain from configuration is used.
A normalized text-to-speech response from the first provider that succeeds.
Streams text-to-speech audio through the configured provider chain.
The text-to-speech request payload.
The execution context used for request-scoped artifacts, history, and timeline data.
OptionalproviderChain: ProviderRef[]Optional provider-chain override. When omitted, the default chain from configuration is used.
An async generator yielding normalized text-to-speech chunks from the first provider that succeeds.
Main orchestrator for ProviderPlaneAI consumers.
Responsibilities
Design
Usage
Instantiate once, register providers, and use for all AI requests and session management.
Remarks
This class is the central hub for all AI operations, ensuring that consumers interact with a unified interface regardless of provider or capability.