# OpenMAIC lib/media Image and Video Generation Providers: Complete 2024 Guide

> Explore OpenMAIC lib/media's supported image and video generation providers in this 2024 guide. Discover 11 image and 3 video providers with a unified adapter architecture.

- Repository: [MAIC/OpenMAIC](https://github.com/THU-MAIC/OpenMAIC)
- Tags: guide
- Published: 2026-09-02

---

**OpenMAIC's `lib/media` module supports 11 image generation providers and 3 video generation providers through a unified adapter-based architecture.**

The `lib/media` directory in the [THU-MAIC/OpenMAIC](https://github.com/THU-MAIC/OpenMAIC) repository provides a clean abstraction layer for image and video generation. Rather than calling third-party APIs directly, developers interact with provider-agnostic interfaces while the framework handles service-specific implementations.

## Image Generation Providers in lib/media

OpenMAIC ships with **11 distinct image generation adapters**, covering both commercial APIs and self-hosted solutions.

### Commercial API Adapters

- **OpenAI DALL·E** — [`openai-image-adapter.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/openai-image-adapter.ts)
- **Qwen** (Alibaba) — [`qwen-image-adapter.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/qwen-image-adapter.ts)
- **MiniMax** — [`minimax-image-adapter.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/minimax-image-adapter.ts)
- **Grok** (xAI) — [`grok-image-adapter.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/grok-image-adapter.ts)
- **Seedream** — [`seedream-adapter.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/seedream-adapter.ts)
- **Seedance** — [`seedance-adapter.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/seedance-adapter.ts)
- **Kling** — [`kling-adapter.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/kling-adapter.ts)

### Specialized Platform Adapters

- **Nano-Banana** — [`nano-banana-adapter.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/nano-banana-adapter.ts)
- **Lemonade** — [`lemonade-image-adapter.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/lemonade-image-adapter.ts)
- **HappyHorse** — [`happyhorse-adapter.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/happyhorse-adapter.ts)

### Self-Hosted Adapter

- **ComfyUI** — [`comfyui-image-adapter.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/comfyui-image-adapter.ts)

The [`comfyui-image-adapter.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/comfyui-image-adapter.ts) enables local image generation by interfacing with ComfyUI workflows, making OpenMAIC suitable for privacy-sensitive deployments.

## Video Generation Providers in lib/media

Video generation support is more focused with **3 specialized adapters**:

| Provider | Adapter File | Notes |
|----------|-------------|-------|
| **VEO** (Google) | [`veo-adapter.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/veo-adapter.ts) | High-quality text-to-video |
| **MiniMax** | [`minimax-video-adapter.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/minimax-video-adapter.ts) | Same vendor, separate video API |
| **Grok** (xAI) | [`grok-video-adapter.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/grok-video-adapter.ts) | Video generation via xAI |

## Provider Registration Architecture

All adapters are registered in centralized registry files located at the `lib/media` root:

- **[`image-providers.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/image-providers.ts)** — Maps provider names like `"openai-image"` to their adapter classes
- **[`video-providers.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/video-providers.ts)** — Handles `"veo-video"`, `"minimax-video"`, `"grok-video"`

This registry pattern allows the higher-level media APIs to request generation without hardcoding service details. To add a new provider, implement the adapter interface and register the mapping in the appropriate providers file.

## Example: Using a Provider Programmatically

While the raw source doesn't expose usage examples, the architecture implies this interaction pattern:

```typescript
// Provider selection through registry lookup
const provider = mediaRegistry.getProvider('openai-image');
const result = await provider.generate({
  prompt: 'A futuristic robot in a cyberpunk city',
  size: '1024x1024'
});

```

Each adapter normalizes response formats so calling code receives consistent output regardless of underlying service.

## Summary

- **11 image providers** including DALL·E, Qwen, ComfyUI, and 7 others
- **3 video providers**: VEO, MiniMax, and Grok
- All adapters live in `lib/media/adapters/` with descriptive filenames
- Registration happens in [`image-providers.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/image-providers.ts) and [`video-providers.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/video-providers.ts)
- **ComfyUI support** enables fully self-hosted image generation
- The adapter pattern isolates service-specific logic from application code

## Frequently Asked Questions

### How do I add a custom image provider to OpenMAIC?

Create a new file in `lib/media/adapters/` implementing the adapter interface, then import and register it in [`image-providers.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/image-providers.ts) with a unique provider key. The existing [`openai-image-adapter.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/openai-image-adapter.ts) serves as the canonical reference implementation.

### Does OpenMAIC support local image generation without cloud APIs?

Yes. The [`comfyui-image-adapter.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/comfyui-image-adapter.ts) enables local generation by connecting to a self-hosted ComfyUI instance. This is the only fully offline-capable adapter in the current `lib/media` distribution.

### Why are there separate adapters for MiniMax image and video?

MiniMax operates distinct API endpoints and authentication flows for image versus video generation. The [`minimax-image-adapter.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/minimax-image-adapter.ts) and [`minimax-video-adapter.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/minimax-video-adapter.ts) each handle service-specific request/response formatting while exposing a unified interface to the registry.

### What determines which provider is used at runtime?

The provider registry in [`image-providers.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/image-providers.ts) or [`video-providers.ts`](https://github.com/THU-MAIC/OpenMAIC/blob/main/video-providers.ts) maps string keys to adapter instances. Application configuration or user selection specifies the provider name, and the registry resolves the appropriate adapter implementation transparently.