API Reference
Classes
Section titled “Classes”ComfyUiImageProvider
Section titled “ComfyUiImageProvider”Submits a filled-in workflow to ComfyUI, polls history, fetches output.
ImageConfig
Section titled “ImageConfig”Configuration for the image generation subsystem.
ImageGenerationProvider
Section titled “ImageGenerationProvider”Provider that registers a configured ImageProvider backend.
ImageGenerationTask
Section titled “ImageGenerationTask”Callable task handler — wraps an ImageProvider backend for lexigram-tasks.
Returns a plain dict (never raw MediaAsset bytes) because lexigram-tasks’ result store JSON-serializes JobResult. The umbrella wraps this handler during MultimediaProvider.register() to persist any bytes to lexigram-storage BEFORE this dict is constructed — see the “Async job model” section of the design spec.
ImageModule
Section titled “ImageModule”Image generation integration.
LocalHttpImageProvider
Section titled “LocalHttpImageProvider”Talks to a self-hosted image generation HTTP server.
No SDK dependency — this is the always-available zero-extra backend.
OpenAIImageProvider
Section titled “OpenAIImageProvider”Calls the OpenAI (or an OpenAI-compatible-gateway) Images API.
base_url is configurable rather than hardcoded to api.openai.com so
this can point at a self-hosted or third-party gateway that speaks the
same /v1/images/generations wire shape behind a different model,
including non-OpenAI models routed through a compatible gateway.
StabilityImageProvider
Section titled “StabilityImageProvider”Calls the Stability AI stable-image generation API.
The API returns base64-encoded image bytes in the response body — they are decoded before constructing the MediaAsset.
Exceptions
Section titled “Exceptions”ImageGenerationAuthenticationError
Section titled “ImageGenerationAuthenticationError”Raised when the image backend rejects the configured API credentials.
ImageGenerationError
Section titled “ImageGenerationError”Base for still-image generation errors.
ImageTimeoutError
Section titled “ImageTimeoutError”Raised when an image generation operation exceeds its timeout.